Skip to content

feat: add npm packages as shared plugin dependencies - #52

Merged
joshuapare merged 1 commit into
mainfrom
feat/shared-npm-packages
Mar 28, 2026
Merged

feat: add npm packages as shared plugin dependencies#52
joshuapare merged 1 commit into
mainfrom
feat/shared-npm-packages

Conversation

@joshuapare

@joshuapare joshuapare commented Mar 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add @omniviewdev/base-ui, @omniviewdev/ai-ui, and @omniviewdev/editors (published to npm) as shared dependencies available to plugins
  • Update sharedPackages.ts in the vite plugin with all 6 new entries (packages + CSS imports)
  • Update shared_dependencies.ts in the host app with matching lazy imports
  • Regenerate shim files for the vite plugin
  • Add the 3 packages as dependencies in root package.json

Existing @omniviewdev/ui entries are kept for the migration period.

Test plan

  • Plugins can import from @omniviewdev/base-ui, @omniviewdev/ai-ui, @omniviewdev/editors
  • Imports are externalized in plugin builds (not bundled)
  • Host app provides the shared instances at runtime

Summary by CodeRabbit

Release Notes

  • New Features

    • Added support for three new UI component libraries: ai-ui, base-ui, and editors, expanding available interface components and styling options.
  • Chores

    • Updated dependency management and shared package configuration to integrate new component libraries and their styling assets.

@coderabbitai

coderabbitai Bot commented Mar 28, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@joshuapare has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 16 minutes and 32 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 16 minutes and 32 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 3cc2eea1-44b4-4a87-ab77-bc667c5175b8

📥 Commits

Reviewing files that changed from the base of the PR and between 7fbcf8c and d1b80dd.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (9)
  • package.json
  • packages/omniviewdev-vite-plugin/shims/_omniviewdev__ai-ui.mjs
  • packages/omniviewdev-vite-plugin/shims/_omniviewdev__ai-ui__styles.css.mjs
  • packages/omniviewdev-vite-plugin/shims/_omniviewdev__base-ui.mjs
  • packages/omniviewdev-vite-plugin/shims/_omniviewdev__base-ui__styles.css.mjs
  • packages/omniviewdev-vite-plugin/shims/_omniviewdev__editors.mjs
  • packages/omniviewdev-vite-plugin/shims/_omniviewdev__editors__styles.css.mjs
  • packages/omniviewdev-vite-plugin/src/sharedPackages.ts
  • ui/features/plugins/api/shared_dependencies.ts
📝 Walkthrough

Walkthrough

Added three new npm packages (@omniviewdev/ai-ui, @omniviewdev/base-ui, @omniviewdev/editors) and configured them as shared dependencies. Refactored module shims to export via default exports instead of named exports across runtime and UI modules, eliminating granular re-exports.

Changes

Cohort / File(s) Summary
Dependency Configuration
package.json, packages/omniviewdev-vite-plugin/src/sharedPackages.ts, ui/features/plugins/api/shared_dependencies.ts
Added three new shared packages (@omniviewdev/ai-ui, @omniviewdev/base-ui, @omniviewdev/editors) at version ^0.1.0 and registered them in shared dependency configuration.
New Shim Modules
packages/omniviewdev-vite-plugin/shims/_omniviewdev__ai-ui.mjs, packages/omniviewdev-vite-plugin/shims/_omniviewdev__ai-ui__styles.css.mjs, packages/omniviewdev-vite-plugin/shims/_omniviewdev__base-ui.mjs, packages/omniviewdev-vite-plugin/shims/_omniviewdev__base-ui__styles.css.mjs, packages/omniviewdev-vite-plugin/shims/_omniviewdev__editors.mjs, packages/omniviewdev-vite-plugin/shims/_omniviewdev__editors__styles.css.mjs
Created auto-generated ESM shim modules for the three new packages and their CSS assets, retrieving shared dependencies from window.__OMNIVIEW_SHARED__ and exporting default exports with fallback to module namespace.
Runtime Shim Export Refactoring
packages/omniviewdev-vite-plugin/shims/_omniviewdev__runtime.mjs, packages/omniviewdev-vite-plugin/shims/_omniviewdev__runtime__api.mjs, packages/omniviewdev-vite-plugin/shims/_omniviewdev__runtime__models.mjs, packages/omniviewdev-vite-plugin/shims/_omniviewdev__runtime__runtime.mjs
Removed all named exports (contexts, constants, hooks, utilities, client classes) and replaced with single default export pattern, reducing export surface from 69+ named exports to default-export-only across runtime modules.
UI Shim Export Refactoring
packages/omniviewdev-vite-plugin/shims/_omniviewdev__ui.mjs, packages/omniviewdev-vite-plugin/shims/_omniviewdev__ui__buttons.mjs, packages/omniviewdev-vite-plugin/shims/_omniviewdev__ui__cells.mjs, packages/omniviewdev-vite-plugin/shims/_omniviewdev__ui__charts.mjs, packages/omniviewdev-vite-plugin/shims/_omniviewdev__ui__domain.mjs, packages/omniviewdev-vite-plugin/shims/_omniviewdev__ui__feedback.mjs, packages/omniviewdev-vite-plugin/shims/_omniviewdev__ui__inputs.mjs, packages/omniviewdev-vite-plugin/shims/_omniviewdev__ui__layout.mjs, packages/omniviewdev-vite-plugin/shims/_omniviewdev__ui__menus.mjs, packages/omniviewdev-vite-plugin/shims/_omniviewdev__ui__navigation.mjs, packages/omniviewdev-vite-plugin/shims/_omniviewdev__ui__overlays.mjs, packages/omniviewdev-vite-plugin/shims/_omniviewdev__ui__sidebars.mjs, packages/omniviewdev-vite-plugin/shims/_omniviewdev__ui__table.mjs, packages/omniviewdev-vite-plugin/shims/_omniviewdev__ui__theme.mjs, packages/omniviewdev-vite-plugin/shims/_omniviewdev__ui__types.mjs, packages/omniviewdev-vite-plugin/shims/_omniviewdev__ui__typography.mjs
Systematically removed all named component/utility exports (50+ across UI modules including buttons, layout, charts, tables, overlays, etc.) and consolidated to single default export pattern, changing consumer import strategy from named to default imports.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • Homepage Card setup #22: Directly related refactoring of the shared/shim export surface that shifts from named exports to default-export-only patterns across runtime and UI modules, fundamentally changing how consumers access these shared dependencies.

Poem

🐰 Three new companions hop into our burrow,
Ai-ui, Base-ui, Editors—no sorrow!
We bundled the exports in default-shaped doors,
Now simpler imports across all the floors.
A refactoring feast, our warren's delight! 🎉

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: add npm packages as shared plugin dependencies' clearly and specifically summarizes the main change—adding three npm packages as shared dependencies for plugins.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/shared-npm-packages

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

…dencies

Add the published npm packages to the shared dependencies registry
and vite plugin externals so plugins can consume them without bundling.
Existing shims preserved — regeneration stripped named exports due to
workspace packages not being built at generation time.
@joshuapare
joshuapare force-pushed the feat/shared-npm-packages branch from 7fbcf8c to d1b80dd Compare March 28, 2026 04:02

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 17

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@package.json`:
- Around line 32-34: Update dependency entries for the three early-stage
packages to avoid unintended breaking changes by replacing the caret ranges with
pinned or tilde versions: change "@omniviewdev/ai-ui": "^0.1.0",
"@omniviewdev/base-ui": "^0.1.0", and "@omniviewdev/editors": "^0.1.0" to either
exact pins ("0.1.0") or conservative ranges using tilde ("~0.1.0") so builds
remain stable while these packages are v0.x.

In `@packages/omniviewdev-vite-plugin/shims/_omniviewdev__runtime__api.mjs`:
- Around line 13-14: The shim currently only re-exports a default for module
"@omniviewdev/runtime/api", causing named imports like ResourceClient,
LogsClient, DiagnosticsClient, ExecClient, PluginManager, SettingsClient,
SettingsProvider, UtilsClient, UIClient, MetricClient, DataClient,
DevServerManager, and PluginLogManager to be missing; fix by adding an entry for
"@omniviewdev/runtime/api" to the KNOWN_EXPORTS map in
packages/omniviewdev-vite-plugin/scripts/generate-shims.ts listing those named
exports so the generator will produce an explicit shim that re-exports those
bindings instead of only a default.

In `@packages/omniviewdev-vite-plugin/shims/_omniviewdev__runtime__models.mjs`:
- Around line 13-14: The shim only exports a default (using mod/default) but
consumers import a named namespace "types"; fix by adding an explicit export of
the types namespace at the source or shim level: in the models module add
"export * as types from './bindings/.../types/models'" (so the module exposes
named export "types") or, if you prefer to keep the shim generator route, add
'@omniviewdev/runtime/models' to KNOWN_EXPORTS with ['types'] so the generated
shim includes a named export "types"; ensure the runtime shim no longer only
returns mod.default but also exposes the "types" symbol (matching consumers
using types.Connection, types.ResourceMeta).

In `@packages/omniviewdev-vite-plugin/shims/_omniviewdev__runtime__runtime.mjs`:
- Around line 13-14: The shim currently only sets a default export (the line
exporting mod.default) which removes all named exports and breaks many
consumers; restore the original named exports by re-exporting the module's named
symbols (e.g. Events, Browser, WindowIsFullscreen, Window and any other helpers)
in addition to keeping the default export. Concretely, update the shim around
the export default line to also re-export named exports from the loaded module
(for example via an export-all or by explicitly exporting the module's
properties) so consumers of Events, Browser, WindowIsFullscreen, Window, etc.
continue to work while preserving the default export behavior.

In `@packages/omniviewdev-vite-plugin/shims/_omniviewdev__runtime.mjs`:
- Around line 13-14: Add "@omniviewdev/runtime" to the KNOWN_EXPORTS map inside
packages/omniviewdev-vite-plugin/scripts/generate-shims.ts and list all its
named exports (e.g., useResourceGroups and any other symbols exported from the
runtime) so the generator emits explicit named re-exports instead of falling
back to generateGenericShim; after updating KNOWN_EXPORTS, run the shim
regeneration command (pnpm --filter `@omniviewdev/vite-plugin` generate-shims) to
recreate packages/omniviewdev-vite-plugin/shims/_omniviewdev__runtime.mjs with
proper named exports.

In `@packages/omniviewdev-vite-plugin/shims/_omniviewdev__ui__buttons.mjs`:
- Around line 13-14: The shim currently only returns a default from the module
(mod) which breaks named imports; update the shim to also re-export the named
bindings from mod by adding named exports for the symbols consumed elsewhere:
Button, IconButton, Toolbar, ToolbarGroup, ToggleButton, ToggleGroup, and
SearchBar (i.e., export these names from mod alongside the existing default
export), keeping the existing default-export fallback (mod.default !== undefined
? mod.default : mod) and referencing the same mod identifier.

In `@packages/omniviewdev-vite-plugin/shims/_omniviewdev__ui__cells.mjs`:
- Around line 13-14: The shims currently only export default for `@omniviewdev/ui`
packages, breaking many named imports; update the KNOWN_EXPORTS map in
generate-shims.ts (symbol: KNOWN_EXPORTS) to add entries for
"@omniviewdev/ui/typography", "@omniviewdev/ui/cells", and
"@omniviewdev/ui/table" with their full named export arrays (e.g., typography:
["Text","Heading","CodeInline","CodeBlock"], cells: ["TextCell","ChipCell"],
table: ["ColumnFilter","IDETable","DataTable","TableToolbar","TableSkeleton"]),
then run the shim generator command (pnpm --filter `@omniviewdev/vite-plugin`
generate-shims) to regenerate the shims so the generated files export those
named symbols instead of only default.

In `@packages/omniviewdev-vite-plugin/shims/_omniviewdev__ui__charts.mjs`:
- Around line 13-14: The shim currently only exports a default from the imported
module object "mod" and omits re-exporting named symbols used by consumers;
update the shim generation logic to forward all named exports from the module
namespace (e.g., export const TimeSeriesChart = mod.TimeSeriesChart; export
const BarChart = mod.BarChart; export const PieChart = mod.PieChart; export
const ScatterChart = mod.ScatterChart; export const Sparkline = mod.Sparkline;
export const GaugeCard = mod.GaugeCard; export const MetricsPanel =
mod.MetricsPanel; export const StackedAreaChart = mod.StackedAreaChart; etc.)
and keep the existing default export fallback (export default mod.default !==
undefined ? mod.default : mod), so consumers importing named symbols from
`@omniviewdev/ui/charts` work correctly.

In `@packages/omniviewdev-vite-plugin/shims/_omniviewdev__ui__domain.mjs`:
- Around line 13-14: The shim misses named exports for `@omniviewdev/ui/domain`;
open packages/omniviewdev-vite-plugin/scripts/generate-shims.ts and add an entry
to the KNOWN_EXPORTS map for '@omniviewdev/ui/domain' listing the named exports
ResourceRef, ResourceStatus, DescriptionList, ObjectInspector, EventsList,
LogsViewer, MetricCard, SecretValueMask, ResourceBreadcrumb, Timeline, and
FilterBar; after updating KNOWN_EXPORTS, re-run the shim generation script to
regenerate packages/omniviewdev-vite-plugin/shims/_omniviewdev__ui__domain.mjs
so it includes those named exports in addition to the default export.

In `@packages/omniviewdev-vite-plugin/shims/_omniviewdev__ui__feedback.mjs`:
- Around line 13-14: The shim currently only exports the default (export default
mod.default !== undefined ? mod.default : mod;) which breaks named-import
consumers; update the shim so it also re-exports all named bindings from the
loaded module (i.e., export everything from the underlying module namespace
represented by the variable mod) while keeping the existing default export
behavior so consumers can still import both default and named symbols (refer to
the module namespace variable mod and the current default export expression to
locate where to add the re-export).

In `@packages/omniviewdev-vite-plugin/shims/_omniviewdev__ui__inputs.mjs`:
- Around line 13-14: The shim only provides a default export but callers import
named exports like TextField/TextArea/Select/Checkbox; update the module export
logic to re-export named exports from the imported module (i.e., add an `export
* from mod;` or equivalent re-export after the module is resolved) while keeping
the existing `export default mod.default !== undefined ? mod.default : mod;` so
both default and all named symbols from `mod` are available; locate the code
referencing `mod` in the shim (the current default export expression) and add
the named re-export adjacent to it.

In `@packages/omniviewdev-vite-plugin/shims/_omniviewdev__ui__layout.mjs`:
- Around line 13-14: The shim currently only provides a default export (using
mod.default) which breaks existing named imports like Stack, Inline, Spacer;
update the shim so it re-exports the module's named exports in addition to the
default. Specifically, after resolving the module namespace (mod) keep the
default export logic (mod.default || mod) but also re-export all named exports
from the loaded module namespace (the same symbols exported by
packages/omniviewdev-ui/src/layout/index.ts, e.g., Stack, Inline, Spacer) so
consumers can import those names without errors; ensure the shim exposes both
the default and the named exports from the mod namespace rather than only the
default.

In `@packages/omniviewdev-vite-plugin/shims/_omniviewdev__ui__navigation.mjs`:
- Around line 13-14: The shim currently only exports a default (export default
mod.default !== undefined ? mod.default : mod;) which removes the module's named
exports and breaks imports like Tabs, TabPanel, TreeView, Breadcrumbs, Stepper,
Pagination, DraggableTabs, PersistentTabPanel (and related items such as
TabItem, TreeNode, DraggableTab, StepItem). Update the shim to also re-export
the module's named exports from the mod namespace (e.g., re-export Tabs,
TabPanel, TreeView, Breadcrumbs, Stepper, Pagination, DraggableTabs,
PersistentTabPanel or simply export all named exports from mod) so existing
named imports keep working while preserving the default export behavior
implemented in the current mod.default fallback.

In `@packages/omniviewdev-vite-plugin/shims/_omniviewdev__ui__overlays.mjs`:
- Around line 13-14: The shim currently only exports a default which breaks
named imports from "@omniviewdev/ui/overlays"; update the module export so it
still exports the default (mod.default || mod) and also re-exports/assigns the
named symbols (Modal, Tooltip, Popover, useToast, ToastProvider, Spotlight,
NotificationCenter, ErrorOverlay, Drawer, Dialog) from the module namespace when
present (falling back to properties on the default export if necessary), so both
default and named imports resolve correctly; locate the existing default export
statement and add logic to export those named symbols from mod (or mod.default)
accordingly.

In `@packages/omniviewdev-vite-plugin/shims/_omniviewdev__ui__theme.mjs`:
- Around line 13-14: The shim currently only sets a default export via the
conditional "export default mod.default !== undefined ? mod.default : mod",
which prevents consumers from using named imports like AppTheme or
initThemeRegistry; update the shim so it re-exports the module namespace as
named exports and still provides the default fallback: add a re-export of all
named exports from the loaded module (so named imports like AppTheme work) and
keep the existing default-export fallback using mod and mod.default; modify the
export handling around the symbol "mod" (the conditional default export) to also
perform "export *" semantics for the module namespace so both named and default
imports succeed.

In `@packages/omniviewdev-vite-plugin/shims/_omniviewdev__ui__types.mjs`:
- Around line 13-14: The generated shim for `@omniviewdev/ui/types` only provides
a default export and lacks the named helpers; update the KNOWN_EXPORTS object in
generate-shims.ts to include '@omniviewdev/ui/types' with the named exports
['toMuiColor','toMuiVariant','toMuiSize','toMuiInputSize','sizeOverrideSx','toBorderRadius','toCssColor','statusToColor','INPUT_HEIGHTS'],
then re-run the shim generator (pnpm --filter `@omniviewdev/vite-plugin`
generate-shims) so the shim file (_omniviewdev__ui__types.mjs) preserves those
named exports for consumers importing them.

In `@packages/omniviewdev-vite-plugin/shims/_omniviewdev__ui.mjs`:
- Around line 13-14: The shim currently only provides a default export so named
imports like Card or Avatar fail; update the shim (the module that currently
contains the fallback line "export default mod.default !== undefined ?
mod.default : mod") to explicitly re-export the module's named symbols (e.g.,
Card, Avatar, Divider, ClipboardText, etc.) using the same pattern as other
generated shims (see _dnd-kit__core.mjs): add explicit named re-exports that map
to properties on mod (exporting each named symbol from mod) and then keep the
existing default export fallback as the last line.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: ae58fd1e-6572-495f-b158-ddecc5143eb2

📥 Commits

Reviewing files that changed from the base of the PR and between 349eeba and 7fbcf8c.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (29)
  • package.json
  • packages/omniviewdev-vite-plugin/shims/_omniviewdev__ai-ui.mjs
  • packages/omniviewdev-vite-plugin/shims/_omniviewdev__ai-ui__styles.css.mjs
  • packages/omniviewdev-vite-plugin/shims/_omniviewdev__base-ui.mjs
  • packages/omniviewdev-vite-plugin/shims/_omniviewdev__base-ui__styles.css.mjs
  • packages/omniviewdev-vite-plugin/shims/_omniviewdev__editors.mjs
  • packages/omniviewdev-vite-plugin/shims/_omniviewdev__editors__styles.css.mjs
  • packages/omniviewdev-vite-plugin/shims/_omniviewdev__runtime.mjs
  • packages/omniviewdev-vite-plugin/shims/_omniviewdev__runtime__api.mjs
  • packages/omniviewdev-vite-plugin/shims/_omniviewdev__runtime__models.mjs
  • packages/omniviewdev-vite-plugin/shims/_omniviewdev__runtime__runtime.mjs
  • packages/omniviewdev-vite-plugin/shims/_omniviewdev__ui.mjs
  • packages/omniviewdev-vite-plugin/shims/_omniviewdev__ui__buttons.mjs
  • packages/omniviewdev-vite-plugin/shims/_omniviewdev__ui__cells.mjs
  • packages/omniviewdev-vite-plugin/shims/_omniviewdev__ui__charts.mjs
  • packages/omniviewdev-vite-plugin/shims/_omniviewdev__ui__domain.mjs
  • packages/omniviewdev-vite-plugin/shims/_omniviewdev__ui__feedback.mjs
  • packages/omniviewdev-vite-plugin/shims/_omniviewdev__ui__inputs.mjs
  • packages/omniviewdev-vite-plugin/shims/_omniviewdev__ui__layout.mjs
  • packages/omniviewdev-vite-plugin/shims/_omniviewdev__ui__menus.mjs
  • packages/omniviewdev-vite-plugin/shims/_omniviewdev__ui__navigation.mjs
  • packages/omniviewdev-vite-plugin/shims/_omniviewdev__ui__overlays.mjs
  • packages/omniviewdev-vite-plugin/shims/_omniviewdev__ui__sidebars.mjs
  • packages/omniviewdev-vite-plugin/shims/_omniviewdev__ui__table.mjs
  • packages/omniviewdev-vite-plugin/shims/_omniviewdev__ui__theme.mjs
  • packages/omniviewdev-vite-plugin/shims/_omniviewdev__ui__types.mjs
  • packages/omniviewdev-vite-plugin/shims/_omniviewdev__ui__typography.mjs
  • packages/omniviewdev-vite-plugin/src/sharedPackages.ts
  • ui/features/plugins/api/shared_dependencies.ts

Comment thread package.json
Comment on lines +32 to +34
"@omniviewdev/ai-ui": "^0.1.0",
"@omniviewdev/base-ui": "^0.1.0",
"@omniviewdev/editors": "^0.1.0",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify the new packages exist on npm and check their latest versions
for pkg in "@omniviewdev/ai-ui" "@omniviewdev/base-ui" "@omniviewdev/editors"; do
  echo "=== Checking $pkg ==="
  npm view "$pkg" version 2>/dev/null || echo "Package not found or not published"
done

Repository: omniviewdev/omniview

Length of output: 193


Consider pinning exact versions for early-stage packages.

All three @omniviewdev/* packages (ai-ui, base-ui, editors) exist on npm at 0.1.0. However, with 0.x semver, minor version bumps can introduce breaking changes. For stability during early development, consider pinning to exact versions ("0.1.0") instead of caret ("^0.1.0"), or at minimum use tilde ("~0.1.0").

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@package.json` around lines 32 - 34, Update dependency entries for the three
early-stage packages to avoid unintended breaking changes by replacing the caret
ranges with pinned or tilde versions: change "@omniviewdev/ai-ui": "^0.1.0",
"@omniviewdev/base-ui": "^0.1.0", and "@omniviewdev/editors": "^0.1.0" to either
exact pins ("0.1.0") or conservative ranges using tilde ("~0.1.0") so builds
remain stable while these packages are v0.x.

Comment on lines 13 to 14
// Default export: prefer mod.default, fall back to the module namespace itself.
export default mod.default !== undefined ? mod.default : mod;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

cat -n packages/omniviewdev-vite-plugin/shims/_omniviewdev__runtime__api.mjs

Repository: omniviewdev/omniview

Length of output: 772


🏁 Script executed:

cat -n packages/omniviewdev-runtime/src/api.ts

Repository: omniviewdev/omniview

Length of output: 2001


🏁 Script executed:

rg '@omniviewdev/runtime/api' --type ts --type js --type mjs -A 3

Repository: omniviewdev/omniview

Length of output: 91


🏁 Script executed:

rg 'from\s+["\']@omniviewdev/runtime/api["\']' --type-list | head -20

Repository: omniviewdev/omniview

Length of output: 132


🏁 Script executed:

rg 'from.*@omniviewdev/runtime/api' -A 1 -B 1

Repository: omniviewdev/omniview

Length of output: 6403


🏁 Script executed:

rg 'import.*from.*runtime.*api'

Repository: omniviewdev/omniview

Length of output: 2645


🏁 Script executed:

rg 'export.*ResourceClient|export.*LogsClient|export.*DiagnosticsClient' packages/omniviewdev-vite-plugin/shims/ -l

Repository: omniviewdev/omniview

Length of output: 46


🏁 Script executed:

find packages/omniviewdev-vite-plugin -name "*.ts" -o -name "*.js" | xargs grep -l "generate-shims\|shim.*generation" 2>/dev/null | head -5

Repository: omniviewdev/omniview

Length of output: 223


🏁 Script executed:

cat -n packages/omniviewdev-vite-plugin/scripts/generate-shims.ts

Repository: omniviewdev/omniview

Length of output: 8060


🏁 Script executed:

cat -n packages/omniviewdev-vite-plugin/src/sharedPackages.ts

Repository: omniviewdev/omniview

Length of output: 2991


Shim must export named exports from @omniviewdev/runtime/api.

The generated shim only exports a default export, but packages/omniviewdev-runtime/src/api.ts defines 13+ named exports (ResourceClient, LogsClient, DiagnosticsClient, ExecClient, PluginManager, SettingsClient, SettingsProvider, UtilsClient, UIClient, MetricClient, DataClient, DevServerManager, PluginLogManager). This breaks plugin code that imports these named exports—currently 25+ files in the codebase depend on them.

The issue stems from @omniviewdev/runtime/api not being in the KNOWN_EXPORTS map in packages/omniviewdev-vite-plugin/scripts/generate-shims.ts, and the package cannot be discovered at generation time. Add the named exports to KNOWN_EXPORTS to generate an explicit shim with re-exported bindings.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/omniviewdev-vite-plugin/shims/_omniviewdev__runtime__api.mjs` around
lines 13 - 14, The shim currently only re-exports a default for module
"@omniviewdev/runtime/api", causing named imports like ResourceClient,
LogsClient, DiagnosticsClient, ExecClient, PluginManager, SettingsClient,
SettingsProvider, UtilsClient, UIClient, MetricClient, DataClient,
DevServerManager, and PluginLogManager to be missing; fix by adding an entry for
"@omniviewdev/runtime/api" to the KNOWN_EXPORTS map in
packages/omniviewdev-vite-plugin/scripts/generate-shims.ts listing those named
exports so the generator will produce an explicit shim that re-exports those
bindings instead of only a default.

Comment on lines 13 to 14
// Default export: prefer mod.default, fall back to the module namespace itself.
export default mod.default !== undefined ? mod.default : mod;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

❓ Verification inconclusive

Script executed:

# Read the shim file to see the current state
cat -n packages/omniviewdev-vite-plugin/shims/_omniviewdev__runtime__models.mjs

Repository: omniviewdev/omniview


Repository: omniviewdev/omniview
Exit code: 0

stdout:

     1	// Auto-generated shim for '@omniviewdev/runtime/models'
     2	// DO NOT EDIT -- regenerate with: pnpm --filter `@omniviewdev/vite-plugin` generate-shims
     3	
     4	const mod = window.__OMNIVIEW_SHARED__['@omniviewdev/runtime/models'];
     5	
     6	if (!mod) {
     7	  throw new Error(
     8	    '[omniview] Shared dependency "@omniviewdev/runtime/models" is not available on window.__OMNIVIEW_SHARED__. ' +
     9	    'Ensure the Omniview host app is running and shared deps are exported before loading this plugin.'
    10	  );
    11	}
    12	
    13	// Default export: prefer mod.default, fall back to the module namespace itself.
    14	export default mod.default !== undefined ? mod.default : mod;

Script executed:

# Check the consumer files for their imports
echo "=== useSidebarLayout.tsx ===" && head -10 plugins/aws/ui/src/hooks/useSidebarLayout.tsx && echo -e "\n=== accounts.ts ===" && head -10 plugins/aws/ui/src/types/accounts.ts

Repository: omniviewdev/omniview


Repository: omniviewdev/omniview
Exit code: 0

stdout:

=== useSidebarLayout.tsx ===
import { useResourceGroups } from "@omniviewdev/runtime";
import type { NavMenuItem, NavSection } from "@omniviewdev/ui/sidebars";
import React from "react";
import { types } from "@omniviewdev/runtime/models";
import {
  LuServer, LuNetwork, LuArchive, LuDatabase, LuShield, LuActivity,
  LuContainer, LuZap, LuScale, LuGlobe, LuCloud, LuFolderOpen,
  LuGauge, LuBell, LuList, LuTable, LuMemoryStick, LuWarehouse,
  LuKeyRound, LuLock, LuShieldCheck, LuLayers, LuPlug, LuPackage,
} from "react-icons/lu";

=== accounts.ts ===
import { type types } from '@omniviewdev/runtime/models';

export type ViewMode = 'list' | 'grid';
export type SortByField = 'name' | 'status';
export type SortDirection = 'asc' | 'desc';

export interface FilterState {
  status?: ('connected' | 'disconnected')[];
}


Script executed:

# Find the source file that generates this shim to understand the intent
find . -name "*.ts" -o -name "*.js" | xargs grep -l "runtime/models" | grep -E "(generate|shim|plugin)" | head -20

Repository: omniviewdev/omniview


Repository: omniviewdev/omniview
Exit code: 0

stdout:

./packages/omniviewdev-vite-plugin/src/sharedPackages.ts
./plugins/aws/ui/src/hooks/useAccountAction.ts
./plugins/aws/ui/src/types/accounts.ts
./ui/features/pluginlogs/types.ts
./ui/features/plugins/api/shared_dependencies.ts
./ui/hooks/plugin/useDevServer.ts
./ui/hooks/plugin/usePluginManager.ts

Script executed:

# Check git history to see what changed in the shim file
git log --oneline -20 -- packages/omniviewdev-vite-plugin/shims/_omniviewdev__runtime__models.mjs 2>/dev/null || echo "Git history not available"

Repository: omniviewdev/omniview


Repository: omniviewdev/omniview
Exit code: 0

stdout:

7fbcf8c feat: add `@omniviewdev/base-ui`, ai-ui, editors as shared plugin dependencies

Script executed:

# Try to find the actual models file to see what exports should be available
find . -path "*/runtime/models*" -type f | head -20

Repository: omniviewdev/omniview


Repository: omniviewdev/omniview
Exit code: 0


Script executed:

# Find the runtime package and models source
find . -name "models.ts" -o -name "models.js" | head -20

Repository: omniviewdev/omniview


Repository: omniviewdev/omniview
Exit code: 0

stdout:

./packages/omniviewdev-providers/internal/models.ts
./packages/omniviewdev-runtime/src/bindings/encoding/json/models.ts
./packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/devserver/models.ts
./packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/lifecycle/models.ts
./packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/metric/models.ts
./packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/models.ts
./packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/pluginlog/models.ts
./packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/registry/models.ts
./packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/graph/models.ts
./packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/models.ts
./packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/types/models.ts
./packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/ui/models.ts
./packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/utils/models.ts
./packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/models.ts
./packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/plugin-sdk/pkg/config/models.ts
./packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/plugin-sdk/pkg/types/models.ts
./packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/exec/models.ts
./packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/logs/models.ts
./packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/metric/models.ts
./packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/networker/models.ts

Script executed:

# Check the sharedPackages.ts to understand the setup
cat -n packages/omniviewdev-vite-plugin/src/sharedPackages.ts | head -50

Repository: omniviewdev/omniview


Repository: omniviewdev/omniview
Exit code: 0

stdout:

     1	/**
     2	 * The canonical list of package names shared between the Omniview host app
     3	 * and plugins. Every entry here corresponds to an entry in the host's
     4	 * shared_dependencies.ts.
     5	 *
     6	 * IMPORTANT: Keep this list in sync with:
     7	 *   /ui/features/plugins/api/shared_dependencies.ts
     8	 *
     9	 * After modifying this list, run:
    10	 *   pnpm --filter `@omniviewdev/vite-plugin` generate-shims
    11	 */
    12	export const SHARED_PACKAGES: readonly string[] = [
    13	  // Emotion
    14	  '@emotion/react',
    15	  '@emotion/styled',
    16	
    17	  // MUI Material
    18	  '@mui/material',
    19	  '@mui/material/utils',
    20	  '@mui/material/styles',
    21	  '@mui/material/Box',
    22	  '@mui/material/Grid',
    23	  '@mui/material/GlobalStyles',
    24	  '@mui/material/CssBaseline',
    25	  '@mui/material/CircularProgress',
    26	  '@mui/material/LinearProgress',
    27	  '@mui/material/Divider',
    28	  '@mui/icons-material',
    29	  '@mui/x-charts',
    30	
    31	  // `@omniviewdev/ui` design system
    32	  '@omniviewdev/ui',
    33	  '@omniviewdev/ui/buttons',
    34	  '@omniviewdev/ui/inputs',
    35	  '@omniviewdev/ui/feedback',
    36	  '@omniviewdev/ui/typography',
    37	  '@omniviewdev/ui/overlays',
    38	  '@omniviewdev/ui/navigation',
    39	  '@omniviewdev/ui/table',
    40	  '@omniviewdev/ui/layout',
    41	  '@omniviewdev/ui/domain',
    42	  '@omniviewdev/ui/charts',
    43	  '@omniviewdev/ui/editors',
    44	  '@omniviewdev/ui/types',
    45	  '@omniviewdev/ui/theme',
    46	  '@omniviewdev/ui/menus',
    47	  '@omniviewdev/ui/sidebars',
    48	  '@omniviewdev/ui/cells',
    49	
    50	  // React

Script executed:

# Look for the shim generator code
find packages/omniviewdev-vite-plugin -name "*.ts" -o -name "*.js" | xargs grep -l "generate-shims\|generateShim" 2>/dev/null | head -10

Repository: omniviewdev/omniview


Repository: omniviewdev/omniview
Exit code: 0

stdout:

packages/omniviewdev-vite-plugin/scripts/generate-shims.ts
packages/omniviewdev-vite-plugin/src/index.ts
packages/omniviewdev-vite-plugin/src/sharedPackages.ts

Script executed:

# Search for what was in the original export of models
rg "export.*types" packages/omniviewdev-runtime/src/models.ts -A 2 -B 2 2>/dev/null || echo "File not found, searching for runtime folder"

Repository: omniviewdev/omniview


Repository: omniviewdev/omniview
Exit code: 0

stdout:

export * from './bindings/github.com/omniviewdev/omniview/models';
export * from './bindings/github.com/omniviewdev/plugin-sdk/pkg/types/models';
export * from './bindings/github.com/omniviewdev/plugin-sdk/pkg/config/models';
export * from './bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/resource/models';
--
} from './bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/metric/models';

// networker: re-export everything except Connection (collides with types)
export {
  FindPortForwardSessionRequest,

Script executed:

# Check directory structure of packages
ls -la packages/ | grep runtime

Repository: omniviewdev/omniview


Repository: omniviewdev/omniview
Exit code: 0

stdout:

drwxr-xr-x  3 jailuser jailuser  180 Mar 28 03:49 omniviewdev-runtime

Script executed:

# Read the full models.ts file to see all exports
cat -n packages/omniviewdev-runtime/src/models.ts

Repository: omniviewdev/omniview


Repository: omniviewdev/omniview
Exit code: 0

stdout:

     1	export * from './bindings/github.com/omniviewdev/omniview/models';
     2	export * from './bindings/github.com/omniviewdev/plugin-sdk/pkg/types/models';
     3	export * from './bindings/github.com/omniviewdev/plugin-sdk/pkg/config/models';
     4	export * from './bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/resource/models';
     5	
     6	// exec: selectively re-export to avoid Handler/ActionTargetBuilder collisions
     7	// with logs and metric packages. The UI only uses exec's Handler.
     8	export {
     9	  ActionTargetBuilder,
    10	  Handler,
    11	  Session,
    12	  SessionOptions,
    13	} from './bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/exec/models';
    14	
    15	// logs: re-export everything except Handler and ActionTargetBuilder (collide with exec)
    16	export {
    17	  CreateSessionOptions,
    18	  LogSession,
    19	  LogSessionOptions,
    20	  LogSessionStatus,
    21	  LogSource,
    22	  LogStreamCommand,
    23	} from './bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/logs/models';
    24	
    25	// metric: re-export everything except Handler (collides with exec)
    26	export {
    27	  AggregateValue,
    28	  ColorRange,
    29	  CurrentValue,
    30	  DataPoint,
    31	  MetricDescriptor,
    32	  MetricResult,
    33	  MetricShape,
    34	  MetricUnit,
    35	  QueryRequest,
    36	  QueryResponse,
    37	  TimeSeries,
    38	} from './bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/metric/models';
    39	
    40	// networker: re-export everything except Connection (collides with types)
    41	export {
    42	  FindPortForwardSessionRequest,
    43	  PortForwardConnectionType,
    44	  PortForwardProtocol,
    45	  PortForwardSession,
    46	  PortForwardSessionEncryption,
    47	  PortForwardSessionOptions,
    48	  SessionState,
    49	} from './bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/networker/models';
    50	
    51	export * from './bindings/github.com/omniviewdev/plugin-sdk/settings/models';
    52	
    53	// devserver: re-export everything except LogEntry (collides with pluginlog)
    54	export {
    55	  BuildError,
    56	  DevInfoFile,
    57	  DevProcessStatus,
    58	  DevServerErrorPayload,
    59	  DevServerMode,
    60	  DevServerState,
    61	  LogEntry as DevServerLogEntry,
    62	} from './bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/devserver/models';
    63	
    64	// pluginlog: only LogEntry remains (re-aliased to avoid collision with devserver)
    65	export {
    66	  LogEntry as PluginLogEntry,
    67	} from './bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/pluginlog/models';
    68	
    69	export * from './bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/ui/models';

Script executed:

# Read the generate-shims script to understand how it generates the shim
cat -n packages/omniviewdev-vite-plugin/scripts/generate-shims.ts

Repository: omniviewdev/omniview


Repository: omniviewdev/omniview
Exit code: 0

stdout:

     1	/**
     2	 * generate-shims.ts
     3	 *
     4	 * Generates .mjs shim files in the shims/ directory. Each shim file
     5	 * re-exports a shared dependency from window.__OMNIVIEW_SHARED__.
     6	 *
     7	 * Run: pnpm --filter `@omniviewdev/vite-plugin` generate-shims
     8	 *   or: npx tsx scripts/generate-shims.ts
     9	 */
    10	
    11	import fs from 'node:fs';
    12	import path from 'node:path';
    13	import { fileURLToPath } from 'node:url';
    14	
    15	const __dirname = path.dirname(fileURLToPath(import.meta.url));
    16	const SHIMS_DIR = path.resolve(__dirname, '..', 'shims');
    17	
    18	// Import from source directly (tsx handles it)
    19	import { SHARED_PACKAGES } from '../src/sharedPackages';
    20	import { safeFilename } from '../src/safeFilename';
    21	
    22	/**
    23	 * Known named exports for critical packages. These are generated with
    24	 * explicit export statements for maximum compatibility.
    25	 */
    26	const KNOWN_EXPORTS: Record<string, string[]> = {
    27	  'react': [
    28	    'Children', 'Component', 'Fragment', 'Profiler', 'PureComponent',
    29	    'StrictMode', 'Suspense', '__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED',
    30	    'act', 'cloneElement', 'createContext', 'createElement', 'createFactory',
    31	    'createRef', 'forwardRef', 'isValidElement', 'lazy', 'memo',
    32	    'startTransition', 'unstable_act', 'useCallback', 'useContext',
    33	    'useDebugValue', 'useDeferredValue', 'useEffect', 'useId',
    34	    'useImperativeHandle', 'useInsertionEffect', 'useLayoutEffect', 'useMemo',
    35	    'useReducer', 'useRef', 'useState', 'useSyncExternalStore', 'useTransition',
    36	    'version',
    37	  ],
    38	  'react/jsx-runtime': [
    39	    'Fragment', 'jsx', 'jsxs',
    40	  ],
    41	  'react-dom': [
    42	    'createPortal', 'flushSync', 'hydrate', 'render', 'unmountComponentAtNode',
    43	    'unstable_batchedUpdates', 'unstable_renderSubtreeIntoContainer', 'version',
    44	  ],
    45	  'react-router-dom': [
    46	    'BrowserRouter', 'HashRouter', 'Link', 'MemoryRouter', 'NavLink',
    47	    'Navigate', 'Outlet', 'Route', 'Router', 'Routes', 'ScrollRestoration',
    48	    'UNSAFE_DataRouterContext', 'UNSAFE_DataRouterStateContext',
    49	    'UNSAFE_LocationContext', 'UNSAFE_NavigationContext', 'UNSAFE_RouteContext',
    50	    'createBrowserRouter', 'createHashRouter', 'createMemoryRouter',
    51	    'createPath', 'createRoutesFromChildren', 'createRoutesFromElements',
    52	    'createSearchParams', 'generatePath', 'isRouteErrorResponse',
    53	    'matchPath', 'matchRoutes', 'parsePath', 'redirect', 'renderMatches',
    54	    'resolvePath', 'unstable_useBlocker', 'useActionData', 'useFetcher',
    55	    'useFetchers', 'useFormAction', 'useHref', 'useInRouterContext',
    56	    'useLinkClickHandler', 'useLoaderData', 'useLocation', 'useMatch',
    57	    'useMatches', 'useNavigate', 'useNavigation', 'useNavigationType',
    58	    'useOutlet', 'useOutletContext', 'useParams', 'useResolvedPath',
    59	    'useRevalidator', 'useRouteError', 'useRouteLoaderData', 'useRoutes',
    60	    'useSearchParams', 'useSubmit',
    61	  ],
    62	  // Monaco-dependent — can't be imported in Node at generation time
    63	  '@omniviewdev/ui/editors': [
    64	    'CodeEditor', 'DiffViewer', 'Terminal', 'CommandPalette',
    65	    'MarkdownPreview',
    66	    'registerOmniviewThemes', 'omniviewDark', 'omniviewLight',
    67	  ],
    68	};
    69	
    70	/**
    71	 * Generate a shim file for a package with known named exports.
    72	 */
    73	function generateExplicitShim(packageName: string, exports: string[]): string {
    74	  const lines: string[] = [
    75	    `// Auto-generated shim for '${packageName}'`,
    76	    `// DO NOT EDIT -- regenerate with: pnpm --filter `@omniviewdev/vite-plugin` generate-shims`,
    77	    ``,
    78	    `const mod = window.__OMNIVIEW_SHARED__['${packageName}'];`,
    79	    ``,
    80	    `if (!mod) {`,
    81	    `  throw new Error(`,
    82	    `    '[omniview] Shared dependency "${packageName}" is not available on window.__OMNIVIEW_SHARED__. ' +`,
    83	    `    'Ensure the Omniview host app is running and shared deps are exported before loading this plugin.'`,
    84	    `  );`,
    85	    `}`,
    86	    ``,
    87	  ];
    88	
    89	  for (const name of exports) {
    90	    lines.push(`export const ${name} = mod.${name};`);
    91	  }
    92	
    93	  lines.push(``);
    94	  lines.push(`export default mod.default !== undefined ? mod.default : mod;`);
    95	
    96	  return lines.join('\n') + '\n';
    97	}
    98	
    99	/**
   100	 * Generate a generic shim for a package where we do not know the exact exports.
   101	 */
   102	function generateGenericShim(packageName: string): string {
   103	  const lines: string[] = [
   104	    `// Auto-generated shim for '${packageName}'`,
   105	    `// DO NOT EDIT -- regenerate with: pnpm --filter `@omniviewdev/vite-plugin` generate-shims`,
   106	    ``,
   107	    `const mod = window.__OMNIVIEW_SHARED__['${packageName}'];`,
   108	    ``,
   109	    `if (!mod) {`,
   110	    `  throw new Error(`,
   111	    `    '[omniview] Shared dependency "${packageName}" is not available on window.__OMNIVIEW_SHARED__. ' +`,
   112	    `    'Ensure the Omniview host app is running and shared deps are exported before loading this plugin.'`,
   113	    `  );`,
   114	    `}`,
   115	    ``,
   116	    `// Default export: prefer mod.default, fall back to the module namespace itself.`,
   117	    `export default mod.default !== undefined ? mod.default : mod;`,
   118	  ];
   119	
   120	  return lines.join('\n') + '\n';
   121	}
   122	
   123	/**
   124	 * Attempt to dynamically import a package and return its named export keys.
   125	 * Falls back to KNOWN_EXPORTS or empty array on failure.
   126	 */
   127	async function discoverExports(packageName: string): Promise<string[]> {
   128	  // Use hardcoded list if available
   129	  if (KNOWN_EXPORTS[packageName]) {
   130	    return KNOWN_EXPORTS[packageName];
   131	  }
   132	
   133	  try {
   134	    const mod = await import(packageName);
   135	    const keys = Object.keys(mod).filter(
   136	      (k) => k !== 'default' && k !== '__esModule' && /^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(k)
   137	    );
   138	    return keys;
   139	  } catch {
   140	    // Package can't be imported at generation time (e.g. native module, missing peer dep)
   141	    return [];
   142	  }
   143	}
   144	
   145	// ─────────────────────────────────────────────────────────────────────────────
   146	// Main
   147	// ─────────────────────────────────────────────────────────────────────────────
   148	
   149	async function main(): Promise<void> {
   150	  // Ensure shims directory exists
   151	  if (!fs.existsSync(SHIMS_DIR)) {
   152	    fs.mkdirSync(SHIMS_DIR, { recursive: true });
   153	  }
   154	
   155	  // Clean existing shims
   156	  const existingFiles = fs.readdirSync(SHIMS_DIR).filter(f => f.endsWith('.mjs'));
   157	  for (const file of existingFiles) {
   158	    fs.unlinkSync(path.join(SHIMS_DIR, file));
   159	  }
   160	
   161	  let generated = 0;
   162	  let autoDiscovered = 0;
   163	
   164	  for (const pkg of SHARED_PACKAGES) {
   165	    const filename = safeFilename(pkg) + '.mjs';
   166	    const filepath = path.join(SHIMS_DIR, filename);
   167	
   168	    const exports = await discoverExports(pkg);
   169	    let content: string;
   170	    if (exports.length > 0) {
   171	      content = generateExplicitShim(pkg, exports);
   172	      if (!KNOWN_EXPORTS[pkg]) autoDiscovered++;
   173	    } else {
   174	      content = generateGenericShim(pkg);
   175	    }
   176	
   177	    fs.writeFileSync(filepath, content, 'utf-8');
   178	    generated++;
   179	  }
   180	
   181	  console.log(`Generated ${generated} shim files in ${SHIMS_DIR} (${autoDiscovered} auto-discovered)`);
   182	}
   183	
   184	main();

Script executed:

# Check what 'types' is in the source binding file
cat -n packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/plugin-sdk/pkg/types/models.ts | head -50

Repository: omniviewdev/omniview


Repository: omniviewdev/omniview
Exit code: 0

stdout:

     1	// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
     2	// This file is automatically generated. DO NOT EDIT
     3	
     4	// eslint-disable-next-line `@typescript-eslint/ban-ts-comment`
     5	// `@ts-ignore`: Unused imports
     6	import { Create as $Create } from "@wailsio/runtime";
     7	
     8	// eslint-disable-next-line `@typescript-eslint/ban-ts-comment`
     9	// `@ts-ignore`: Unused imports
    10	import * as config$0 from "../config/models.js";
    11	// eslint-disable-next-line `@typescript-eslint/ban-ts-comment`
    12	// `@ts-ignore`: Unused imports
    13	import * as time$0 from "../../../../../time/models.js";
    14	
    15	/**
    16	 * Capability represents a plugin capability as a string type.
    17	 * Using strings allows direct matching with YAML/JSON config values
    18	 * and makes adding new capabilities non-breaking.
    19	 */
    20	export enum Capability {
    21	    /**
    22	     * The Go zero value for the underlying type of the enum.
    23	     */
    24	    $zero = "",
    25	
    26	    CapabilityResource = "resource",
    27	    CapabilityExec = "exec",
    28	    CapabilityNetworker = "networker",
    29	    CapabilityLog = "log",
    30	    CapabilityMetric = "metric",
    31	    CapabilitySettings = "settings",
    32	    CapabilityUI = "ui",
    33	};
    34	
    35	/**
    36	 * Connection holds the current state (and configuration data) for an
    37	 * connection target for a plugin (e.g. a Kubernetes cluster, a cloud role, etc)
    38	 * 
    39	 * This will be passed within the PluginContext so that it may be used across all requests,
    40	 * and data here not within the sensitiveStore will be exposed to the user in the UI for the
    41	 * plugin.
    42	 */
    43	export class Connection {
    44	    /**
    45	     * LastRefresh is the time when the auth context was last refreshed
    46	     * +optional
    47	     */
    48	    "last_refresh": time$0.Time;
    49	
    50	    /**

Script executed:

# Verify the package.json and build status of `@omniviewdev/runtime`
cat packages/omniviewdev-runtime/package.json | jq '.name, .exports, .main'

Repository: omniviewdev/omniview


Repository: omniviewdev/omniview
Exit code: 0

stdout:

"@omniviewdev/runtime"
{
  ".": {
    "import": "./dist/index.js",
    "require": "./dist/index.cjs"
  },
  "./api": {
    "import": "./dist/api.js",
    "require": "./dist/api.cjs"
  },
  "./models": {
    "import": "./dist/models.js",
    "require": "./dist/models.cjs"
  },
  "./runtime": {
    "import": "./dist/runtime.js",
    "require": "./dist/runtime.cjs"
  }
}
"dist/index.cjs"

Script executed:

# Check if `@omniviewdev/runtime/models` can actually be imported
cd packages/omniviewdev-runtime && node -e "import('./src/models.ts').then(m => console.log('Exports:', Object.keys(m).slice(0, 20)))" 2>&1 || echo "Failed to import"

Repository: omniviewdev/omniview


Repository: omniviewdev/omniview
Exit code: 0

stdout:

node:internal/modules/esm/resolve:274
    throw new ERR_MODULE_NOT_FOUND(
          ^

Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/home/jailuser/git/packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/models' imported from /home/jailuser/git/packages/omniviewdev-runtime/src/models.ts
    at finalizeResolution (node:internal/modules/esm/resolve:274:11)
    at moduleResolve (node:internal/modules/esm/resolve:859:10)
    at defaultResolve (node:internal/modules/esm/resolve:983:11)
    at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:801:12)
    at `#cachedDefaultResolve` (node:internal/modules/esm/loader:725:25)
    at ModuleLoader.resolve (node:internal/modules/esm/loader:708:38)
    at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:309:38)
    at `#link` (node:internal/modules/esm/module_job:202:49) {
  code: 'ERR_MODULE_NOT_FOUND',
  url: 'file:///home/jailuser/git/packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/models'
}

Node.js v24.3.0
Failed to import

Script executed:

# Check the compiled dist/models.js to see what exports it actually provides
head -100 packages/omniviewdev-runtime/dist/models.js 2>/dev/null || echo "dist not found, checking if it needs to be built"

Repository: omniviewdev/omniview


Repository: omniviewdev/omniview
Exit code: 0

stdout:

dist not found, checking if it needs to be built

Script executed:

# Check if 'types' is exported from any of the binding files being re-exported
rg "export.*types" packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/plugin-sdk/pkg/types/models.ts

Repository: omniviewdev/omniview


Repository: omniviewdev/omniview
Exit code: 1


Script executed:

# Read the full types/models.ts to see what it actually exports
cat packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/plugin-sdk/pkg/types/models.ts

Repository: omniviewdev/omniview


Repository: omniviewdev/omniview
Exit code: 0

stdout:

// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT

// eslint-disable-next-line `@typescript-eslint/ban-ts-comment`
// `@ts-ignore`: Unused imports
import { Create as $Create } from "@wailsio/runtime";

// eslint-disable-next-line `@typescript-eslint/ban-ts-comment`
// `@ts-ignore`: Unused imports
import * as config$0 from "../config/models.js";
// eslint-disable-next-line `@typescript-eslint/ban-ts-comment`
// `@ts-ignore`: Unused imports
import * as time$0 from "../../../../../time/models.js";

/**
 * Capability represents a plugin capability as a string type.
 * Using strings allows direct matching with YAML/JSON config values
 * and makes adding new capabilities non-breaking.
 */
export enum Capability {
    /**
     * The Go zero value for the underlying type of the enum.
     */
    $zero = "",

    CapabilityResource = "resource",
    CapabilityExec = "exec",
    CapabilityNetworker = "networker",
    CapabilityLog = "log",
    CapabilityMetric = "metric",
    CapabilitySettings = "settings",
    CapabilityUI = "ui",
};

/**
 * Connection holds the current state (and configuration data) for an
 * connection target for a plugin (e.g. a Kubernetes cluster, a cloud role, etc)
 * 
 * This will be passed within the PluginContext so that it may be used across all requests,
 * and data here not within the sensitiveStore will be exposed to the user in the UI for the
 * plugin.
 */
export class Connection {
    /**
     * LastRefresh is the time when the auth context was last refreshed
     * +optional
     */
    "last_refresh": time$0.Time;

    /**
     * Data is an optional map of arbitrary data that can be used to store additional information about the connection,
     * such as credential file locations, etc.
     * 
     * This data is exposed to the user in the UI under the settings panel for the namespace. If the data is sensitive,
     * it should be stored in the SensitiveData field.
     * +optional
     */
    "data": { [_ in string]?: any };

    /**
     * Labels is a map of arbitrary key-value pairs that can be used to store additional information about the connection.
     * Users will likely use and modify these labels to help organize and categorize their connections.
     */
    "labels": { [_ in string]?: any };

    /**
     * Lifecycle contains IDE-managed lifecycle behavior for the connection.
     * This is used by the host to orchestrate behaviors like auto-connect.
     */
    "lifecycle": ConnectionLifecycle;

    /**
     * ID is the unique identifier for the connection that makes sense to the plugin implementation.
     * +required
     */
    "id": string;

    /**
     * UID is an autogenerated unique identifier for the connection that the IDE will use to identify and track.
     */
    "uid": string;

    /**
     * Name is the readable name of the connection. Editable by the user.
     * +required
     */
    "name": string;

    /**
     * Description is an optional description of the connection. This is primarily for the user to customize
     * the visual representation of the connection.
     * +optional
     */
    "description": string;

    /**
     * Avatar is an optional image that can be used to represent the connection. This is primarily for the user to customize
     * the visual representation of the connection in the UI.
     * +optional
     */
    "avatar": string;

    /**
     * ExpiryTime is the amount of time before the connection expires.
     * +optional
     */
    "expiry_time": time$0.Duration;

    /**
     * Client is a client structure that should be populated when the connection is created and used for connections
     */
    "Client": any;

    /** Creates a new Connection instance. */
    constructor($$source: Partial<Connection> = {}) {
        if (!("last_refresh" in $$source)) {
            this["last_refresh"] = null;
        }
        if (!("data" in $$source)) {
            this["data"] = {};
        }
        if (!("labels" in $$source)) {
            this["labels"] = {};
        }
        if (!("lifecycle" in $$source)) {
            this["lifecycle"] = (new ConnectionLifecycle());
        }
        if (!("id" in $$source)) {
            this["id"] = "";
        }
        if (!("uid" in $$source)) {
            this["uid"] = "";
        }
        if (!("name" in $$source)) {
            this["name"] = "";
        }
        if (!("description" in $$source)) {
            this["description"] = "";
        }
        if (!("avatar" in $$source)) {
            this["avatar"] = "";
        }
        if (!("expiry_time" in $$source)) {
            this["expiry_time"] = time$0.Duration.$zero;
        }
        if (!("Client" in $$source)) {
            this["Client"] = null;
        }

        Object.assign(this, $$source);
    }

    /**
     * Creates a new Connection instance from a string or object.
     */
    static createFrom($$source: any = {}): Connection {
        const $$createField1_0 = $$createType0;
        const $$createField2_0 = $$createType0;
        const $$createField3_0 = $$createType1;
        let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
        if ("data" in $$parsedSource) {
            $$parsedSource["data"] = $$createField1_0($$parsedSource["data"]);
        }
        if ("labels" in $$parsedSource) {
            $$parsedSource["labels"] = $$createField2_0($$parsedSource["labels"]);
        }
        if ("lifecycle" in $$parsedSource) {
            $$parsedSource["lifecycle"] = $$createField3_0($$parsedSource["lifecycle"]);
        }
        return new Connection($$parsedSource as Partial<Connection>);
    }
}

export class ConnectionAutoConnect {
    "enabled": boolean;
    "triggers": ConnectionAutoConnectTrigger[];
    "retry": ConnectionAutoConnectRetry;

    /** Creates a new ConnectionAutoConnect instance. */
    constructor($$source: Partial<ConnectionAutoConnect> = {}) {
        if (!("enabled" in $$source)) {
            this["enabled"] = false;
        }
        if (!("triggers" in $$source)) {
            this["triggers"] = [];
        }
        if (!("retry" in $$source)) {
            this["retry"] = ConnectionAutoConnectRetry.$zero;
        }

        Object.assign(this, $$source);
    }

    /**
     * Creates a new ConnectionAutoConnect instance from a string or object.
     */
    static createFrom($$source: any = {}): ConnectionAutoConnect {
        const $$createField1_0 = $$createType2;
        let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
        if ("triggers" in $$parsedSource) {
            $$parsedSource["triggers"] = $$createField1_0($$parsedSource["triggers"]);
        }
        return new ConnectionAutoConnect($$parsedSource as Partial<ConnectionAutoConnect>);
    }
}

export enum ConnectionAutoConnectRetry {
    /**
     * The Go zero value for the underlying type of the enum.
     */
    $zero = "",

    ConnectionAutoConnectRetryNone = "NONE",
    ConnectionAutoConnectRetryOnChange = "ON_CHANGE",
};

export enum ConnectionAutoConnectTrigger {
    /**
     * The Go zero value for the underlying type of the enum.
     */
    $zero = "",

    ConnectionAutoConnectTriggerPluginStart = "PLUGIN_START",
    ConnectionAutoConnectTriggerConnectionDiscovered = "CONNECTION_DISCOVERED",
};

export class ConnectionLifecycle {
    "auto_connect"?: ConnectionAutoConnect | null;

    /** Creates a new ConnectionLifecycle instance. */
    constructor($$source: Partial<ConnectionLifecycle> = {}) {

        Object.assign(this, $$source);
    }

    /**
     * Creates a new ConnectionLifecycle instance from a string or object.
     */
    static createFrom($$source: any = {}): ConnectionLifecycle {
        const $$createField0_0 = $$createType4;
        let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
        if ("auto_connect" in $$parsedSource) {
            $$parsedSource["auto_connect"] = $$createField0_0($$parsedSource["auto_connect"]);
        }
        return new ConnectionLifecycle($$parsedSource as Partial<ConnectionLifecycle>);
    }
}

export class ConnectionStatus {
    /**
     * Connection is the connection that the status is for.
     */
    "connection": Connection | null;

    /**
     * StatusCode is the status code of the connection status.
     */
    "status": ConnectionStatusCode;

    /**
     * Error is the error that occurred when checking the connection status.
     */
    "error": string;

    /**
     * Message is a human readable message that describes the status.
     */
    "details": string;

    /** Creates a new ConnectionStatus instance. */
    constructor($$source: Partial<ConnectionStatus> = {}) {
        if (!("connection" in $$source)) {
            this["connection"] = null;
        }
        if (!("status" in $$source)) {
            this["status"] = ConnectionStatusCode.$zero;
        }
        if (!("error" in $$source)) {
            this["error"] = "";
        }
        if (!("details" in $$source)) {
            this["details"] = "";
        }

        Object.assign(this, $$source);
    }

    /**
     * Creates a new ConnectionStatus instance from a string or object.
     */
    static createFrom($$source: any = {}): ConnectionStatus {
        const $$createField0_0 = $$createType6;
        let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
        if ("connection" in $$parsedSource) {
            $$parsedSource["connection"] = $$createField0_0($$parsedSource["connection"]);
        }
        return new ConnectionStatus($$parsedSource as Partial<ConnectionStatus>);
    }
}

export enum ConnectionStatusCode {
    /**
     * The Go zero value for the underlying type of the enum.
     */
    $zero = "",

    ConnectionStatusUnknown = "UNKNOWN",
    ConnectionStatusConnected = "CONNECTED",
    ConnectionStatusDisconnected = "DISCONNECTED",
    ConnectionStatusPending = "PENDING",
    ConnectionStatusFailed = "FAILED",
    ConnectionStatusError = "ERROR",
    ConnectionStatusUnauthorized = "UNAUTHORIZED",
    ConnectionStatusForbidden = "FORBIDDEN",
    ConnectionStatusBadRequest = "BAD_REQUEST",
    ConnectionStatusNotFound = "NOT_FOUND",
    ConnectionStatusTimeout = "TIMEOUT",
    ConnectionStatusUnavailable = "UNAVAILABLE",
    ConnectionStatusRequestEntityTooLarge = "REQUEST_ENTITY_TOO_LARGE",
};

/**
 * PluginInfo represents the display/API-facing view of a plugin.
 * This type is safe to serialize to JSON for the frontend.
 * Runtime fields (RPCClient, PluginClient) live in the host-only PluginRecord.
 */
export class PluginInfo {
    "id": string;
    "metadata": config$0.PluginMeta;
    "phase": string;
    "enabled": boolean;
    "devMode": boolean;
    "devPath"?: string;
    "capabilities": Capability[];
    "lastError"?: string;

    /** Creates a new PluginInfo instance. */
    constructor($$source: Partial<PluginInfo> = {}) {
        if (!("id" in $$source)) {
            this["id"] = "";
        }
        if (!("metadata" in $$source)) {
            this["metadata"] = (new config$0.PluginMeta());
        }
        if (!("phase" in $$source)) {
            this["phase"] = "";
        }
        if (!("enabled" in $$source)) {
            this["enabled"] = false;
        }
        if (!("devMode" in $$source)) {
            this["devMode"] = false;
        }
        if (!("capabilities" in $$source)) {
            this["capabilities"] = [];
        }

        Object.assign(this, $$source);
    }

    /**
     * Creates a new PluginInfo instance from a string or object.
     */
    static createFrom($$source: any = {}): PluginInfo {
        const $$createField1_0 = $$createType7;
        const $$createField6_0 = $$createType8;
        let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
        if ("metadata" in $$parsedSource) {
            $$parsedSource["metadata"] = $$createField1_0($$parsedSource["metadata"]);
        }
        if ("capabilities" in $$parsedSource) {
            $$parsedSource["capabilities"] = $$createField6_0($$parsedSource["capabilities"]);
        }
        return new PluginInfo($$parsedSource as Partial<PluginInfo>);
    }
}

// Private type creation functions
const $$createType0 = $Create.Map($Create.Any, $Create.Any);
const $$createType1 = ConnectionLifecycle.createFrom;
const $$createType2 = $Create.Array($Create.Any);
const $$createType3 = ConnectionAutoConnect.createFrom;
const $$createType4 = $Create.Nullable($$createType3);
const $$createType5 = Connection.createFrom;
const $$createType6 = $Create.Nullable($$createType5);
const $$createType7 = config$0.PluginMeta.createFrom;
const $$createType8 = $Create.Array($Create.Any);

Script executed:

# Search for 'types' in models.ts to understand what it is
rg "types" packages/omniviewdev-runtime/src/models.ts -B 2 -A 2

Repository: omniviewdev/omniview


Repository: omniviewdev/omniview
Exit code: 0

stdout:

export * from './bindings/github.com/omniviewdev/omniview/models';
export * from './bindings/github.com/omniviewdev/plugin-sdk/pkg/types/models';
export * from './bindings/github.com/omniviewdev/plugin-sdk/pkg/config/models';
export * from './bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/resource/models';
--
} from './bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/metric/models';

// networker: re-export everything except Connection (collides with types)
export {
  FindPortForwardSessionRequest,

Script executed:

# Check the consumers again to be absolutely sure about what they import
rg "import.*types.*from.*@omniviewdev/runtime/models" plugins/aws/ui/src --type ts

Repository: omniviewdev/omniview


Repository: omniviewdev/omniview
Exit code: 0

stdout:

plugins/aws/ui/src/types/accounts.ts:import { type types } from '@omniviewdev/runtime/models';
plugins/aws/ui/src/hooks/useSidebarLayout.tsx:import { types } from "@omniviewdev/runtime/models";
plugins/aws/ui/src/hooks/useAccountAction.ts:import { types } from '@omniviewdev/runtime/models';
plugins/aws/ui/src/components/connections/ConnectionTable.tsx:import { types } from '@omniviewdev/runtime/models';

Script executed:

# Search for explicit 'types' export in models.ts or the binding
rg "export.*\btypes\b" packages/omniviewdev-runtime/src/ -A 2 -B 2

Repository: omniviewdev/omniview


Repository: omniviewdev/omniview
Exit code: 0

stdout:

packages/omniviewdev-runtime/src/models.ts-export * from './bindings/github.com/omniviewdev/omniview/models';
packages/omniviewdev-runtime/src/models.ts:export * from './bindings/github.com/omniviewdev/plugin-sdk/pkg/types/models';
packages/omniviewdev-runtime/src/models.ts-export * from './bindings/github.com/omniviewdev/plugin-sdk/pkg/config/models';
packages/omniviewdev-runtime/src/models.ts-export * from './bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/resource/models';
--
packages/omniviewdev-runtime/src/models.ts-} from './bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/metric/models';
packages/omniviewdev-runtime/src/models.ts-
packages/omniviewdev-runtime/src/models.ts:// networker: re-export everything except Connection (collides with types)
packages/omniviewdev-runtime/src/models.ts-export {
packages/omniviewdev-runtime/src/models.ts-  FindPortForwardSessionRequest,
--
packages/omniviewdev-runtime/src/index.ts-export * from './hooks';
packages/omniviewdev-runtime/src/index.ts-export * from './router';
packages/omniviewdev-runtime/src/index.ts:export * from './types';
packages/omniviewdev-runtime/src/index.ts-export * from './utils/resourceKey';
--
packages/omniviewdev-runtime/src/hooks/networker/index.ts-export * from './usePortForwardSessions'
packages/omniviewdev-runtime/src/hooks/networker/index.ts-export * from './useResourcePortForwarder'
packages/omniviewdev-runtime/src/hooks/networker/index.ts:export * from './types'
--
packages/omniviewdev-runtime/src/errors/index.ts-export { parseAppError, isCancelledError, actionToSnackbar, createErrorHandler, showAppError } from './parseAppError';
packages/omniviewdev-runtime/src/errors/index.ts:export { ErrorTypes } from './types';
packages/omniviewdev-runtime/src/errors/index.ts:export type { AppError, AppErrorAction } from './types';
--
packages/omniviewdev-runtime/src/context/drawer/index.ts-// } from "./types"
packages/omniviewdev-runtime/src/context/drawer/index.ts-
packages/omniviewdev-runtime/src/context/drawer/index.ts:export * from './types'
packages/omniviewdev-runtime/src/context/drawer/index.ts-export * from './BottomDrawerContext'
packages/omniviewdev-runtime/src/context/drawer/index.ts-export * from './RightDrawerContext'
--
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/servicewrapper.ts-import * as $models from "./models.js";
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/servicewrapper.ts-
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/servicewrapper.ts:export function GetPlugin(id: string): $CancellablePromise<types$0.PluginInfo> {
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/servicewrapper.ts-    return $Call.ByID(3150413499, id).then(($result: any) => {
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/servicewrapper.ts-        return $$createType0($result);
--
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/servicewrapper.ts-}
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/servicewrapper.ts-
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/servicewrapper.ts:export function ListPlugins(): $CancellablePromise<types$0.PluginInfo[]> {
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/servicewrapper.ts-    return $Call.ByID(550607756).then(($result: any) => {
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/servicewrapper.ts-        return $$createType12($result);
--
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/servicewrapper.ts-}
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/servicewrapper.ts-
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/servicewrapper.ts:export function LoadPlugin(id: string, opts: $models.LoadPluginOptions | null): $CancellablePromise<types$0.PluginInfo> {
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/servicewrapper.ts-    return $Call.ByID(288660195, id, opts).then(($result: any) => {
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/servicewrapper.ts-        return $$createType0($result);
--
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/servicewrapper.ts-}
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/servicewrapper.ts-
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/servicewrapper.ts:export function ReloadPlugin(id: string): $CancellablePromise<types$0.PluginInfo> {
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/servicewrapper.ts-    return $Call.ByID(1771013494, id).then(($result: any) => {
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/servicewrapper.ts-        return $$createType0($result);
--
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/servicewrapper.ts-}
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/servicewrapper.ts-
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/servicewrapper.ts:export function RetryFailedPlugin(id: string): $CancellablePromise<types$0.PluginInfo> {
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/servicewrapper.ts-    return $Call.ByID(2433379724, id).then(($result: any) => {
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/servicewrapper.ts-        return $$createType0($result);
--
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/servicewrapper.ts-}
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/servicewrapper.ts-
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/servicewrapper.ts:export function UninstallPlugin(id: string): $CancellablePromise<types$0.PluginInfo> {
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/servicewrapper.ts-    return $Call.ByID(1369550929, id).then(($result: any) => {
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/servicewrapper.ts-        return $$createType0($result);
--
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/servicewrapper.ts-import * as $models from "./models.js";
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/servicewrapper.ts-
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/servicewrapper.ts:export function AddConnection(pluginID: string, connection: types$0.Connection): $CancellablePromise<void> {
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/servicewrapper.ts-    return $Call.ByID(4065522324, pluginID, connection);
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/servicewrapper.ts-}
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/servicewrapper.ts-
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/servicewrapper.ts:export function CheckConnection(pluginID: string, connectionID: string): $CancellablePromise<types$0.ConnectionStatus> {
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/servicewrapper.ts-    return $Call.ByID(1688967279, pluginID, connectionID).then(($result: any) => {
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/servicewrapper.ts-        return $$createType0($result);
--
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/servicewrapper.ts-}
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/servicewrapper.ts-
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/servicewrapper.ts:export function GetConnection(pluginID: string, connectionID: string): $CancellablePromise<types$0.Connection> {
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/servicewrapper.ts-    return $Call.ByID(950535743, pluginID, connectionID).then(($result: any) => {
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/servicewrapper.ts-        return $$createType16($result);
--
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/servicewrapper.ts-}
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/servicewrapper.ts-
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/servicewrapper.ts:export function ListAllConnections(): $CancellablePromise<{ [_ in string]?: types$0.Connection[] }> {
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/servicewrapper.ts-    return $Call.ByID(1598984489).then(($result: any) => {
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/servicewrapper.ts-        return $$createType41($result);
--
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/servicewrapper.ts-}
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/servicewrapper.ts-
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/servicewrapper.ts:export function ListConnections(pluginID: string): $CancellablePromise<types$0.Connection[]> {
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/servicewrapper.ts-    return $Call.ByID(1775572154, pluginID).then(($result: any) => {
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/servicewrapper.ts-        return $$createType40($result);
--
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/servicewrapper.ts-}
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/servicewrapper.ts-
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/servicewrapper.ts:export function LoadConnections(pluginID: string): $CancellablePromise<types$0.Connection[]> {
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/servicewrapper.ts-    return $Call.ByID(2037329938, pluginID).then(($result: any) => {
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/servicewrapper.ts-        return $$createType40($result);
--
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/servicewrapper.ts- * Connection lifecycle
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/servicewrapper.ts- */
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/servicewrapper.ts:export function StartConnection(pluginID: string, connectionID: string): $CancellablePromise<types$0.ConnectionStatus> {
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/servicewrapper.ts-    return $Call.ByID(3276991559, pluginID, connectionID).then(($result: any) => {
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/servicewrapper.ts-        return $$createType0($result);
--
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/servicewrapper.ts-}
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/servicewrapper.ts-
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/servicewrapper.ts:export function StopConnection(pluginID: string, connectionID: string): $CancellablePromise<types$0.Connection> {
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/servicewrapper.ts-    return $Call.ByID(794258089, pluginID, connectionID).then(($result: any) => {
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/servicewrapper.ts-        return $$createType16($result);
--
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/servicewrapper.ts-}
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/servicewrapper.ts-
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/servicewrapper.ts:export function UpdateConnection(pluginID: string, connection: types$0.Connection): $CancellablePromise<types$0.Connection> {
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/servicewrapper.ts-    return $Call.ByID(2131988692, pluginID, connection).then(($result: any) => {
packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/servicewrapper.ts-        return $$createType16($result);

Script executed:

# Try searching for where types object is created or assigned
rg "\btypes\s*=" packages/omniviewdev-runtime/src/models.ts

Repository: omniviewdev/omniview


Repository: omniviewdev/omniview
Exit code: 1


Script executed:

# Check if there's a namespace or type declaration for 'types'
ast-grep --pattern 'export namespace types { $$$ }' packages/omniviewdev-runtime/src/

Repository: omniviewdev/omniview


Repository: omniviewdev/omniview
Exit code: 1


Script executed:

# Look at the full models.ts again to check if there's a types export we missed
wc -l packages/omniviewdev-runtime/src/models.ts && tail -20 packages/omniviewdev-runtime/src/models.ts

Repository: omniviewdev/omniview


Repository: omniviewdev/omniview
Exit code: 0

stdout:

69 packages/omniviewdev-runtime/src/models.ts

export * from './bindings/github.com/omniviewdev/plugin-sdk/settings/models';

// devserver: re-export everything except LogEntry (collides with pluginlog)
export {
  BuildError,
  DevInfoFile,
  DevProcessStatus,
  DevServerErrorPayload,
  DevServerMode,
  DevServerState,
  LogEntry as DevServerLogEntry,
} from './bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/devserver/models';

// pluginlog: only LogEntry remains (re-aliased to avoid collision with devserver)
export {
  LogEntry as PluginLogEntry,
} from './bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/pluginlog/models';

export * from './bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/ui/models';

Script executed:

# Check if there's a types.ts file or types namespace in runtime
find packages/omniviewdev-runtime/src -name "types.ts" -o -name "types.d.ts" | head -5

Repository: omniviewdev/omniview


Repository: omniviewdev/omniview
Exit code: 0

stdout:

packages/omniviewdev-runtime/src/context/drawer/types.ts
packages/omniviewdev-runtime/src/errors/types.ts
packages/omniviewdev-runtime/src/extensions/points/resource/types.ts
packages/omniviewdev-runtime/src/hooks/networker/types.ts

Script executed:

# Look for namespace types in the binding files
rg "namespace types|export.*namespace.*types" packages/omniviewdev-runtime/src/bindings/

Repository: omniviewdev/omniview


Repository: omniviewdev/omniview
Exit code: 1


Script executed:

# Check what index.ts exports that might be types
cat -n packages/omniviewdev-runtime/src/types.ts | head -50

Repository: omniviewdev/omniview


Repository: omniviewdev/omniview
Exit code: 0

stderr:

cat: packages/omniviewdev-runtime/src/types.ts: No such file or directory

Script executed:

# Double-check the consumer import paths - are they really from models or from root?
rg "from.*@omniviewdev/runtime" plugins/aws/ui/src/hooks/useSidebarLayout.tsx plugins/aws/ui/src/types/accounts.ts

Repository: omniviewdev/omniview


Repository: omniviewdev/omniview
Exit code: 0

stdout:

plugins/aws/ui/src/types/accounts.ts:import { type types } from '@omniviewdev/runtime/models';
plugins/aws/ui/src/hooks/useSidebarLayout.tsx:import { useResourceGroups } from "@omniviewdev/runtime";
plugins/aws/ui/src/hooks/useSidebarLayout.tsx:import { types } from "@omniviewdev/runtime/models";

Script executed:

# Search more carefully for how 'types' is exported from models.ts or bindings
rg "export.*\btypes\b" packages/omniviewdev-runtime/src/models.ts

Repository: omniviewdev/omniview


Repository: omniviewdev/omniview
Exit code: 0

stdout:

export * from './bindings/github.com/omniviewdev/plugin-sdk/pkg/types/models';
// networker: re-export everything except Connection (collides with types)

Script executed:

# Check if types is re-exported with 'as' keyword
rg "export.*as.*types" packages/omniviewdev-runtime/src/

Repository: omniviewdev/omniview


Repository: omniviewdev/omniview
Exit code: 1


Script executed:

# Look at the actual structure - maybe types is a namespace created from the bindings import
rg "import.*types" packages/omniviewdev-runtime/src/models.ts

Repository: omniviewdev/omniview


Repository: omniviewdev/omniview
Exit code: 1


Script executed:

# Check if the pkg/types/models has any re-export alias
rg "export.*as\s" packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/plugin-sdk/pkg/types/models.ts | head -20

Repository: omniviewdev/omniview


Repository: omniviewdev/omniview
Exit code: 0


Script executed:

# Try to understand what changed - check git for previous versions of models.ts
git show HEAD~5:packages/omniviewdev-runtime/src/models.ts 2>/dev/null | grep -A 5 -B 5 "types" | head -40 || echo "Git history not available"

Repository: omniviewdev/omniview


Repository: omniviewdev/omniview
Exit code: 0


Script executed:

# Let me check the bindings file more carefully to find what it exports
head -100 packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/plugin-sdk/pkg/types/models.ts | grep "^export"

Repository: omniviewdev/omniview


Repository: omniviewdev/omniview
Exit code: 0

stdout:

export enum Capability {
export class Connection {

Script executed:

# Check all exports in the types binding
rg "^export (class|enum|interface|type|const|namespace)" packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/plugin-sdk/pkg/types/models.ts | cut -d: -f2 | sort

Repository: omniviewdev/omniview


Repository: omniviewdev/omniview
Exit code: 0

stdout:

export class Connection {
export class ConnectionAutoConnect {
export class ConnectionLifecycle {
export class ConnectionStatus {
export class PluginInfo {
export enum Capability {
export enum ConnectionAutoConnectRetry {
export enum ConnectionAutoConnectTrigger {
export enum ConnectionStatusCode {

Script executed:

# Look at what the discoverable exports would be at runtime from models.ts
node -e "
const mod = { 
  Connection: class {}, 
  Capability: 'enum',
  PluginInfo: class {},
  // ... other exports from the binding
};
// Simulate what the shim generator tries to do
const keys = Object.keys(mod).filter(k => k !== 'default' && k !== '__esModule' && /^[a-zA-Z_\$][a-zA-Z0-9_\$]*\$/.test(k));
console.log('Discovered keys:', keys);
" 2>&1 || echo "Simulation done"

Repository: omniviewdev/omniview


Repository: omniviewdev/omniview
Exit code: 0

stdout:

Discovered keys: [ 'Connection', 'Capability', 'PluginInfo' ]

Script executed:

# Final check: does models.ts itself define or create a 'types' export?
cat packages/omniviewdev-runtime/src/models.ts | grep -i "^export\|^const types\|namespace types"

Repository: omniviewdev/omniview


Repository: omniviewdev/omniview
Exit code: 0

stdout:

export * from './bindings/github.com/omniviewdev/omniview/models';
export * from './bindings/github.com/omniviewdev/plugin-sdk/pkg/types/models';
export * from './bindings/github.com/omniviewdev/plugin-sdk/pkg/config/models';
export * from './bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/resource/models';
export {
export {
export {
export {
export * from './bindings/github.com/omniviewdev/plugin-sdk/settings/models';
export {
export {
export * from './bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/ui/models';

Script executed:

# The bindings file itself might have a namespace or a types export
wc -l packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/plugin-sdk/pkg/types/models.ts && tail -50 packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/plugin-sdk/pkg/types/models.ts

Repository: omniviewdev/omniview


Repository: omniviewdev/omniview
Exit code: 0

stdout:

387 packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/plugin-sdk/pkg/types/models.ts
    constructor($$source: Partial<PluginInfo> = {}) {
        if (!("id" in $$source)) {
            this["id"] = "";
        }
        if (!("metadata" in $$source)) {
            this["metadata"] = (new config$0.PluginMeta());
        }
        if (!("phase" in $$source)) {
            this["phase"] = "";
        }
        if (!("enabled" in $$source)) {
            this["enabled"] = false;
        }
        if (!("devMode" in $$source)) {
            this["devMode"] = false;
        }
        if (!("capabilities" in $$source)) {
            this["capabilities"] = [];
        }

        Object.assign(this, $$source);
    }

    /**
     * Creates a new PluginInfo instance from a string or object.
     */
    static createFrom($$source: any = {}): PluginInfo {
        const $$createField1_0 = $$createType7;
        const $$createField6_0 = $$createType8;
        let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
        if ("metadata" in $$parsedSource) {
            $$parsedSource["metadata"] = $$createField1_0($$parsedSource["metadata"]);
        }
        if ("capabilities" in $$parsedSource) {
            $$parsedSource["capabilities"] = $$createField6_0($$parsedSource["capabilities"]);
        }
        return new PluginInfo($$parsedSource as Partial<PluginInfo>);
    }
}

// Private type creation functions
const $$createType0 = $Create.Map($Create.Any, $Create.Any);
const $$createType1 = ConnectionLifecycle.createFrom;
const $$createType2 = $Create.Array($Create.Any);
const $$createType3 = ConnectionAutoConnect.createFrom;
const $$createType4 = $Create.Nullable($$createType3);
const $$createType5 = Connection.createFrom;
const $$createType6 = $Create.Nullable($$createType5);
const $$createType7 = config$0.PluginMeta.createFrom;
const $$createType8 = $Create.Array($Create.Any);

Script executed:

# Check if there's a namespace definition anywhere for types
rg "namespace types" packages/omniviewdev-runtime/src/

Repository: omniviewdev/omniview


Repository: omniviewdev/omniview
Exit code: 1


Script executed:

# Check what the actual runtime error would be - look at the compiled output if it exists
find packages/omniviewdev-runtime/dist -name "*.js" 2>/dev/null | head -1 | xargs head -50

Repository: omniviewdev/omniview


Repository: omniviewdev/omniview
Exit code: 0


Script executed:

# Let me check if maybe types is imported and re-exported with a different name in models.ts
cat -n packages/omniviewdev-runtime/src/models.ts | grep -B 5 -A 5 "types"

Repository: omniviewdev/omniview


Repository: omniviewdev/omniview
Exit code: 0

stdout:

     1	export * from './bindings/github.com/omniviewdev/omniview/models';
     2	export * from './bindings/github.com/omniviewdev/plugin-sdk/pkg/types/models';
     3	export * from './bindings/github.com/omniviewdev/plugin-sdk/pkg/config/models';
     4	export * from './bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/resource/models';
     5	
     6	// exec: selectively re-export to avoid Handler/ActionTargetBuilder collisions
     7	// with logs and metric packages. The UI only uses exec's Handler.
--
    35	  QueryRequest,
    36	  QueryResponse,
    37	  TimeSeries,
    38	} from './bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/metric/models';
    39	
    40	// networker: re-export everything except Connection (collides with types)
    41	export {
    42	  FindPortForwardSessionRequest,
    43	  PortForwardConnectionType,
    44	  PortForwardProtocol,
    45	  PortForwardSession,

Script executed:

# Maybe 'types' is a namespace in the first export from omniviewdev/omniview/models
head -100 packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/models.ts | grep -i "namespace\|export.*types"

Repository: omniviewdev/omniview


Repository: omniviewdev/omniview
Exit code: 1


Script executed:

# Final attempt: search for any TypeScript namespace declaration for 'types' across the entire runtime
find packages/omniviewdev-runtime/src -type f \( -name "*.ts" -o -name "*.tsx" \) -exec grep -l "namespace\s\+types\|export\s\+namespace\s\+types" {} \;

Repository: omniviewdev/omniview


Repository: omniviewdev/omniview
Exit code: 0


Script executed:

# Check the omniviewdev/omniview/models.ts binding - maybe it defines a types namespace
head -200 packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/models.ts | grep -i "namespace\|export.*types\|^export"

Repository: omniviewdev/omniview


Repository: omniviewdev/omniview
Exit code: 0

stdout:

export class FileDialogOptions {
export class FileFilter {

Script executed:

# Let me also check what the first export statement actually exports
rg "export" packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/models.ts | head -30

Repository: omniviewdev/omniview


Repository: omniviewdev/omniview
Exit code: 0

stdout:

export class FileDialogOptions {
export class FileFilter {

Script executed:

# Maybe there's a types namespace created with re-exports - check the end of omniviewdev/omniview/models
tail -100 packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/models.ts | grep -E "(namespace|export|types)"

Repository: omniviewdev/omniview


Repository: omniviewdev/omniview
Exit code: 0

stdout:

// eslint-disable-next-line `@typescript-eslint/ban-ts-comment`
export class FileDialogOptions {
export class FileFilter {

Script executed:

# Check if maybe the bindings have a namespace alias
wc -l packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/models.ts

Repository: omniviewdev/omniview


Repository: omniviewdev/omniview
Exit code: 0

stdout:

101 packages/omniviewdev-runtime/src/bindings/github.com/omniviewdev/omniview/models.ts

Script executed:

# Check if there's an export * as types pattern that might have been removed
rg "export\s+\*\s+as\s+" packages/omniviewdev-runtime/src/

Repository: omniviewdev/omniview


Repository: omniviewdev/omniview
Exit code: 0

stdout:

packages/omniviewdev-runtime/src/api.ts:export * as ExecClient from './bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/exec/servicewrapper';
packages/omniviewdev-runtime/src/api.ts:export * as NetworkerClient from './bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/networker/servicewrapper';
packages/omniviewdev-runtime/src/api.ts:export * as PluginManager from './bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/servicewrapper';
packages/omniviewdev-runtime/src/api.ts:export * as ResourceClient from './bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/servicewrapper';
packages/omniviewdev-runtime/src/api.ts:export * as SettingsClient from './bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/settings/servicewrapper';
packages/omniviewdev-runtime/src/api.ts:export * as SettingsProvider from './bindings/github.com/omniviewdev/omniview/internal/settings/servicewrapper';
packages/omniviewdev-runtime/src/api.ts:export * as UtilsClient from './bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/utils/client';
packages/omniviewdev-runtime/src/api.ts:export * as UIClient from './bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/ui/servicewrapper';
packages/omniviewdev-runtime/src/api.ts:export * as DiagnosticsClient from './bindings/github.com/omniviewdev/omniview/backend/diagnostics/diagnosticsclient';
packages/omniviewdev-runtime/src/api.ts:export * as LogsClient from './bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/logs/servicewrapper';
packages/omniviewdev-runtime/src/api.ts:export * as MetricClient from './bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/metric/servicewrapper';
packages/omniviewdev-runtime/src/api.ts:export * as DataClient from './bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/data/servicewrapper';
packages/omniviewdev-runtime/src/api.ts:export * as DevServerManager from './bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/devserver/servicewrapper';
packages/omniviewdev-runtime/src/api.ts:export * as PluginLogManager from './bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/pluginlog/servicewrapper';

Script executed:

# Let me check git diff to see what actually changed in models.ts recently
git log --oneline -10 -- packages/omniviewdev-runtime/src/models.ts

Repository: omniviewdev/omniview


Repository: omniviewdev/omniview
Exit code: 0

stdout:

7fbcf8c feat: add `@omniviewdev/base-ui`, ai-ui, editors as shared plugin dependencies

Script executed:

# Check git diff for the specific commit that modified models.ts
git log --all --oneline | head -5 | while read commit msg; do
  echo "=== Commit: $commit ==="
  git show $commit:packages/omniviewdev-runtime/src/models.ts 2>/dev/null | grep -i "types" | head -3 || echo "File doesn't exist in this commit"
done

Repository: omniviewdev/omniview


Repository: omniviewdev/omniview
Exit code: 0

stdout:

=== Commit: 7fbcf8c ===
export * from './bindings/github.com/omniviewdev/plugin-sdk/pkg/types/models';
// networker: re-export everything except Connection (collides with types)
=== Commit: 349eeba ===
export * from './bindings/github.com/omniviewdev/plugin-sdk/pkg/types/models';
// networker: re-export everything except Connection (collides with types)
=== Commit: 89cf055 ===
export * from './bindings/github.com/omniviewdev/plugin-sdk/pkg/types/models';
// networker: re-export everything except Connection (collides with types)
=== Commit: e92d797 ===
export * from './bindings/github.com/omniviewdev/plugin-sdk/pkg/types/models';
// networker: re-export everything except Connection (collides with types)
=== Commit: 696ec38 ===
export * from './bindings/github.com/omniviewdev/plugin-sdk/pkg/types/models';
// networker: re-export everything except Connection (collides with types)

Script executed:

# Try a different approach - check if there's an index.ts that might export types namespace
cat packages/omniviewdev-runtime/src/index.ts | grep -i types

Repository: omniviewdev/omniview


Repository: omniviewdev/omniview
Exit code: 0

stdout:

export * from './types';

Script executed:

# Check if there's supposed to be an export * as types pattern
git show HEAD:packages/omniviewdev-runtime/src/models.ts | head -20

Repository: omniviewdev/omniview


Repository: omniviewdev/omniview
Exit code: 0

stdout:

export * from './bindings/github.com/omniviewdev/omniview/models';
export * from './bindings/github.com/omniviewdev/plugin-sdk/pkg/types/models';
export * from './bindings/github.com/omniviewdev/plugin-sdk/pkg/config/models';
export * from './bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/resource/models';

// exec: selectively re-export to avoid Handler/ActionTargetBuilder collisions
// with logs and metric packages. The UI only uses exec's Handler.
export {
  ActionTargetBuilder,
  Handler,
  Session,
  SessionOptions,
} from './bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/exec/models';

// logs: re-export everything except Handler and ActionTargetBuilder (collide with exec)
export {
  CreateSessionOptions,
  LogSession,
  LogSessionOptions,
  LogSessionStatus,

Script executed:

# Check the git log more carefully - did models.ts ever have export * as types?
git log -p -- packages/omniviewdev-runtime/src/models.ts | grep -A 5 -B 5 "as types" | head -30

Repository: omniviewdev/omniview


Repository: omniviewdev/omniview
Exit code: 0


Script executed:

# Let me check what the comment "collides with types" actually refers to
git log -p -- packages/omniviewdev-runtime/src/models.ts | grep -B 10 -A 10 "collides with types" | head -40

Repository: omniviewdev/omniview


Repository: omniviewdev/omniview
Exit code: 0


Script executed:

# Maybe types is supposed to be created from the pkg/types/models export - check if there's an import alias
grep -n "import.*as types\|export.*as types" packages/omniviewdev-runtime/src/models.ts

Repository: omniviewdev/omniview


Repository: omniviewdev/omniview
Exit code: 1


Script executed:

# Let me check what 'types' actually resolves to when you try importing it - test the actual module
node --input-type=module -e "
try {
  const mod = await import('@omniviewdev/runtime/models');
  console.log('Keys in module:', Object.keys(mod).slice(0, 30));
  console.log('Has types?', 'types' in mod);
} catch(e) {
  console.error('Error:', e.message);
}
" 2>&1 || echo "Module import test skipped"

Repository: omniviewdev/omniview


Repository: omniviewdev/omniview
Exit code: 0

stdout:

Error: Cannot find package '@omniviewdev/runtime' imported from /home/jailuser/git/[eval1]

Script executed:

# Check how the consumers actually use the `types` import - maybe it's a namespace usage
grep -A 5 "import.*types.*from.*@omniviewdev/runtime/models" plugins/aws/ui/src/hooks/useSidebarLayout.tsx plugins/aws/ui/src/types/accounts.ts

Repository: omniviewdev/omniview


Repository: omniviewdev/omniview
Exit code: 0

stdout:

plugins/aws/ui/src/hooks/useSidebarLayout.tsx:import { types } from "@omniviewdev/runtime/models";
plugins/aws/ui/src/hooks/useSidebarLayout.tsx-import {
plugins/aws/ui/src/hooks/useSidebarLayout.tsx-  LuServer, LuNetwork, LuArchive, LuDatabase, LuShield, LuActivity,
plugins/aws/ui/src/hooks/useSidebarLayout.tsx-  LuContainer, LuZap, LuScale, LuGlobe, LuCloud, LuFolderOpen,
plugins/aws/ui/src/hooks/useSidebarLayout.tsx-  LuGauge, LuBell, LuList, LuTable, LuMemoryStick, LuWarehouse,
plugins/aws/ui/src/hooks/useSidebarLayout.tsx-  LuKeyRound, LuLock, LuShieldCheck, LuLayers, LuPlug, LuPackage,
--
plugins/aws/ui/src/types/accounts.ts:import { type types } from '@omniviewdev/runtime/models';
plugins/aws/ui/src/types/accounts.ts-
plugins/aws/ui/src/types/accounts.ts-export type ViewMode = 'list' | 'grid';
plugins/aws/ui/src/types/accounts.ts-export type SortByField = 'name' | 'status';
plugins/aws/ui/src/types/accounts.ts-export type SortDirection = 'asc' | 'desc';
plugins/aws/ui/src/types/accounts.ts-

Script executed:

# Check if maybe the import resolves to something else or there's a different export pattern
rg "types\." plugins/aws/ui/src/hooks/useSidebarLayout.tsx plugins/aws/ui/src/types/accounts.ts | head -20

Repository: omniviewdev/omniview


Repository: omniviewdev/omniview
Exit code: 0

stdout:

plugins/aws/ui/src/types/accounts.ts:  connection: types.Connection;
plugins/aws/ui/src/hooks/useSidebarLayout.tsx:const toID = (meta: types.ResourceMeta) => `${meta.group}_${meta.version}_${meta.kind}`;
plugins/aws/ui/src/hooks/useSidebarLayout.tsx:const calculateLayout = (data: Record<string, types.ResourceGroup>): Array<NavSection> => {

Script executed:

# Maybe the source SHOULD have export * as types, let me check if there's a pattern in api.ts
grep "export.*as" packages/omniviewdev-runtime/src/api.ts | head -5

Repository: omniviewdev/omniview


Repository: omniviewdev/omniview
Exit code: 0

stdout:

export * as ExecClient from './bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/exec/servicewrapper';
export * as NetworkerClient from './bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/networker/servicewrapper';
export * as PluginManager from './bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/servicewrapper';
export * as ResourceClient from './bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/servicewrapper';
export * as SettingsClient from './bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/settings/servicewrapper';

Script executed:

# Aha! So 'types' is supposed to be a namespace. Let me check if models.ts is supposed to have `export * as types`
git log -p -- packages/omniviewdev-runtime/src/models.ts | grep -B 5 -A 5 "export \* as types" | head -30

Repository: omniviewdev/omniview


Repository: omniviewdev/omniview
Exit code: 0


Script executed:

# Check if there's a previous version that had export * as types
git log --all --format="%H" -- packages/omniviewdev-runtime/src/models.ts | head -20 | while read commit; do
  echo "=== $commit ==="
  git show $commit:packages/omniviewdev-runtime/src/models.ts 2>/dev/null | grep -E "export \* as types|^export \*" | head -5
done

Repository: omniviewdev/omniview


Repository: omniviewdev/omniview
Exit code: 0

stdout:

=== 7fbcf8caded47b15e97d29db590b46d63cc4c3de ===
export * from './bindings/github.com/omniviewdev/omniview/models';
export * from './bindings/github.com/omniviewdev/plugin-sdk/pkg/types/models';
export * from './bindings/github.com/omniviewdev/plugin-sdk/pkg/config/models';
export * from './bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/resource/models';
export * from './bindings/github.com/omniviewdev/plugin-sdk/settings/models';
=== a0ec1de805cdf885fe893e869011466cfef2c510 ===
export * from './bindings/github.com/omniviewdev/omniview/models';
export * from './bindings/github.com/omniviewdev/plugin-sdk/pkg/types/models';
export * from './bindings/github.com/omniviewdev/plugin-sdk/pkg/config/models';
export * from './bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/resource/models';
export * from './bindings/github.com/omniviewdev/plugin-sdk/settings/models';
=== 37d8f2a40f6c9c222c63d016296028350d65c399 ===
export * from './wailsjs/go/models'

Script executed:

# Let me verify that the model.ts SHOULD have `export * as types from ./bindings/...`
# by checking what other namespaces are exported with the `as` pattern
rg "export \* as" packages/omniviewdev-runtime/src/models.ts

Repository: omniviewdev/omniview


Repository: omniviewdev/omniview
Exit code: 1


Script executed:

# Check the git blame or diff history specifically for the pkg/types/models line
git log -p -S "pkg/types/models" -- packages/omniviewdev-runtime/src/models.ts | head -100

Repository: omniviewdev/omniview


Repository: omniviewdev/omniview
Exit code: 0


Add missing types namespace to the shim.

The current shim exports only a default export, but consumers import a named export types that is used as a namespace (e.g., types.Connection, types.ResourceMeta). Four files currently depend on this:

  • plugins/aws/ui/src/hooks/useSidebarLayout.tsx
  • plugins/aws/ui/src/hooks/useAccountAction.ts
  • plugins/aws/ui/src/types/accounts.ts
  • plugins/aws/ui/src/components/connections/ConnectionTable.tsx

The source file packages/omniviewdev-runtime/src/models.ts re-exports from ./bindings/github.com/omniviewdev/plugin-sdk/pkg/types/models but should explicitly export this as a namespace (e.g., export * as types from './bindings/github.com/omniviewdev/plugin-sdk/pkg/types/models') to match the consumer expectations. The shim generator failed to discover named exports and generated a default-only export. Either add @omniviewdev/runtime/models to the KNOWN_EXPORTS with ['types'] in the generator, or ensure the source exports the namespace explicitly.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/omniviewdev-vite-plugin/shims/_omniviewdev__runtime__models.mjs`
around lines 13 - 14, The shim only exports a default (using mod/default) but
consumers import a named namespace "types"; fix by adding an explicit export of
the types namespace at the source or shim level: in the models module add
"export * as types from './bindings/.../types/models'" (so the module exposes
named export "types") or, if you prefer to keep the shim generator route, add
'@omniviewdev/runtime/models' to KNOWN_EXPORTS with ['types'] so the generated
shim includes a named export "types"; ensure the runtime shim no longer only
returns mod.default but also exposes the "types" symbol (matching consumers
using types.Connection, types.ResourceMeta).

Comment on lines 13 to 14
// Default export: prefer mod.default, fall back to the module namespace itself.
export default mod.default !== undefined ? mod.default : mod;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify whether any current code still uses named imports from `@omniviewdev/runtime/runtime`.
rg -nP --iglob '*.{ts,tsx,js,jsx,mts,mjs}' --glob '!packages/omniviewdev-vite-plugin/shims/**' \
  "import(?:\\s+type)?\\s+\\{[^}]+\\}\\s+from\\s+['\"]@omniviewdev/runtime/runtime['\"]"

Repository: omniviewdev/omniview

Length of output: 2300


Restore named exports in the shim to avoid breaking 22+ active imports.

The shim at line 14 removes all named exports from @omniviewdev/runtime/runtime. However, multiple files across the codebase actively import named helpers:

  • Events (11+ files: RightDrawer, BottomDrawer, Terminal, LogViewer, connecting, pluginlogs, createProductionDeps, PluginServiceProvider, devtools, Footer, usePluginManager, etc.)
  • Browser (2 files: PluginDetails, InstalledPluginCard)
  • WindowIsFullscreen (2 files: AppContainerProvider, useWindow)
  • Window (2 files: Header, HeaderTabsArea, HeaderItemsArea)

This change breaks all these imports. The shim generator should preserve the existing named re-exports until these consumers are migrated to the new export model.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/omniviewdev-vite-plugin/shims/_omniviewdev__runtime__runtime.mjs`
around lines 13 - 14, The shim currently only sets a default export (the line
exporting mod.default) which removes all named exports and breaks many
consumers; restore the original named exports by re-exporting the module's named
symbols (e.g. Events, Browser, WindowIsFullscreen, Window and any other helpers)
in addition to keeping the default export. Concretely, update the shim around
the export default line to also re-export named exports from the loaded module
(for example via an export-all or by explicitly exporting the module's
properties) so consumers of Events, Browser, WindowIsFullscreen, Window, etc.
continue to work while preserving the default export behavior.

Comment on lines 13 to 14
// Default export: prefer mod.default, fall back to the module namespace itself.
export default mod.default !== undefined ? mod.default : mod;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

# First, check if the shim file exists and read its content
fd -t f "_omniviewdev__runtime.mjs" packages/

Repository: omniviewdev/omniview

Length of output: 128


🏁 Script executed:

# Check the runtime package structure
fd -t f "index.ts" packages/omniviewdev-runtime/src/

Repository: omniviewdev/omniview

Length of output: 4285


🏁 Script executed:

# Find the consumer file
fd -t f "useSidebarLayout.tsx"

Repository: omniviewdev/omniview

Length of output: 109


🏁 Script executed:

# Look for the vite plugin file that generates shims
fd -t f "index.ts" packages/omniviewdev-vite-plugin/src/ | head -5

Repository: omniviewdev/omniview

Length of output: 109


🏁 Script executed:

# Read the shim file
cat -n packages/omniviewdev-vite-plugin/shims/_omniviewdev__runtime.mjs

Repository: omniviewdev/omniview

Length of output: 760


🏁 Script executed:

# Read the runtime package's main index
cat -n packages/omniviewdev-runtime/src/index.ts | head -30

Repository: omniviewdev/omniview

Length of output: 308


🏁 Script executed:

# Read the consumer file to check import pattern
cat -n plugins/aws/ui/src/hooks/useSidebarLayout.tsx

Repository: omniviewdev/omniview

Length of output: 17074


🏁 Script executed:

# Check the vite plugin to understand shim generation
sed -n '150,200p' packages/omniviewdev-vite-plugin/src/index.ts

Repository: omniviewdev/omniview

Length of output: 851


🏁 Script executed:

# Verify the shim is auto-generated and check if there are previous versions or generator logic
head -5 packages/omniviewdev-vite-plugin/shims/_omniviewdev__runtime.mjs

Repository: omniviewdev/omniview

Length of output: 268


🏁 Script executed:

# Search for the generate-shims command to understand the generator
rg "generate-shims" packages/omniviewdev-vite-plugin/

Repository: omniviewdev/omniview

Length of output: 10714


🏁 Script executed:

# Read the generate-shims script to understand how it creates shims
cat -n packages/omniviewdev-vite-plugin/scripts/generate-shims.ts

Repository: omniviewdev/omniview

Length of output: 8060


🏁 Script executed:

# Check if `@omniviewdev/runtime` is in the KNOWN_EXPORTS list
grep -n "@omniviewdev/runtime" packages/omniviewdev-vite-plugin/scripts/generate-shims.ts

Repository: omniviewdev/omniview

Length of output: 46


🏁 Script executed:

# Read sharedPackages to see if `@omniviewdev/runtime` is listed
cat -n packages/omniviewdev-vite-plugin/src/sharedPackages.ts

Repository: omniviewdev/omniview

Length of output: 2991


Add @omniviewdev/runtime to the shim generator's KNOWN_EXPORTS with its named API.

The shim for @omniviewdev/runtime currently exposes only a default export (lines 13–14), but the package exports exclusively via named bindings (e.g., export * from './context'). In dev mode, when Vite resolves @omniviewdev/runtime to this shim, named imports like useResourceGroups (used in plugins/aws/ui/src/hooks/useSidebarLayout.tsx:1) will fail with "does not provide an export named…" unless the generator emits explicit named re-exports.

The generator script (packages/omniviewdev-vite-plugin/scripts/generate-shims.ts) only generates named exports if the package is listed in KNOWN_EXPORTS (line 26–68) or if dynamic import discovery succeeds at generation time. Since @omniviewdev/runtime is in SHARED_PACKAGES but not in KNOWN_EXPORTS, the generator fell back to generateGenericShim (line 174), which produces only the default export. Add @omniviewdev/runtime to KNOWN_EXPORTS with all its exported symbols, then regenerate the shim with pnpm --filter @omniviewdev/vite-plugin generate-shims.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/omniviewdev-vite-plugin/shims/_omniviewdev__runtime.mjs` around
lines 13 - 14, Add "@omniviewdev/runtime" to the KNOWN_EXPORTS map inside
packages/omniviewdev-vite-plugin/scripts/generate-shims.ts and list all its
named exports (e.g., useResourceGroups and any other symbols exported from the
runtime) so the generator emits explicit named re-exports instead of falling
back to generateGenericShim; after updating KNOWN_EXPORTS, run the shim
regeneration command (pnpm --filter `@omniviewdev/vite-plugin` generate-shims) to
recreate packages/omniviewdev-vite-plugin/shims/_omniviewdev__runtime.mjs with
proper named exports.

Comment on lines 13 to 14
// Default export: prefer mod.default, fall back to the module namespace itself.
export default mod.default !== undefined ? mod.default : mod;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

# First, let's look at the complete shim file
cat -n packages/omniviewdev-vite-plugin/shims/_omniviewdev__ui__navigation.mjs

Repository: omniviewdev/omniview

Length of output: 778


🏁 Script executed:

# Search for imports using the actual module name and the shim name
rg -n "from\s+['\"]@omniviewdev/ui/navigation['\"]|from\s+['\"].*omniviewdev__ui__navigation" --type ts --type tsx --type js --type jsx

Repository: omniviewdev/omniview

Length of output: 91


🏁 Script executed:

# Search for named imports specifically (e.g., import { Tabs, TabPanel })
rg -n "import\s+\{\s*[^}]*\s*\}\s+from" packages/omniviewdev-showcase/src/pages/ -A 2 -B 2 --type ts --type tsx | head -100

Repository: omniviewdev/omniview

Length of output: 91


🏁 Script executed:

# Search for imports of the navigation module without type filters
rg -n "from\s+['\"]@omniviewdev/ui/navigation['\"]|from\s+['\"].*navigation" --glob "*.ts" --glob "*.tsx" --glob "*.js" --glob "*.jsx" | head -50

Repository: omniviewdev/omniview

Length of output: 3554


🏁 Script executed:

# Let's find the actual `@omniviewdev/ui/navigation` module
find . -type f -name "*navigation*" | grep -E "\.(ts|tsx|js|jsx|mjs)$" | grep -v node_modules | grep -v ".next" | head -20

Repository: omniviewdev/omniview

Length of output: 241


🏁 Script executed:

# Search more broadly for imports from this module
rg "import\s*\{" --glob "*.ts" --glob "*.tsx" | rg "navigation|Tabs|TabPanel|Breadcrumb|Stepper" | head -50

Repository: omniviewdev/omniview

Length of output: 5975


🏁 Script executed:

# Find the actual navigation module entry point in packages/omniviewdev-ui
find packages/omniviewdev-ui/src -type f -name "index.*" | grep -i navigation

Repository: omniviewdev/omniview

Length of output: 111


🏁 Script executed:

# Check the navigation directory structure
ls -la packages/omniviewdev-ui/src/navigation/

Repository: omniviewdev/omniview

Length of output: 826


🏁 Script executed:

# Look at what's exported from the navigation index
find packages/omniviewdev-ui/src/navigation -type f \( -name "index.ts" -o -name "index.tsx" \)

Repository: omniviewdev/omniview

Length of output: 111


🏁 Script executed:

# Check what's being exported from the navigation module
cat packages/omniviewdev-ui/src/navigation/index.ts

Repository: omniviewdev/omniview

Length of output: 981


The shim change removes named exports, breaking existing imports throughout the codebase.

The actual @omniviewdev/ui/navigation module exports multiple named symbols: Tabs, TabPanel, TreeView, Breadcrumbs, Stepper, Pagination, DraggableTabs, PersistentTabPanel. However, the shim only exports a default export. This breaks imports in at least 7 files:

  • ui/pages/plugins/PluginDetails.tsx: import { Tabs, TabPanel }
  • ui/components/development/InfoPanel.tsx: import { Tabs, TabPanel }
  • plugins/aws/ui/src/components/shared/detail/ResourceDetailPage.tsx: import { Tabs, TabPanel }
  • packages/omniviewdev-showcase/src/pages/TabsPage.tsx: import { Tabs, TabPanel, TabItem }
  • packages/omniviewdev-showcase/src/pages/TreeViewPage.tsx: import { TreeView, TreeNode }
  • packages/omniviewdev-showcase/src/pages/DraggableTabsPage.tsx: import { DraggableTabs, PersistentTabPanel, DraggableTab }
  • packages/omniviewdev-showcase/src/pages/BreadcrumbsPage.tsx: import { Breadcrumbs, Stepper, Pagination, StepItem }

Re-export named exports from the module to preserve the contract.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/omniviewdev-vite-plugin/shims/_omniviewdev__ui__navigation.mjs`
around lines 13 - 14, The shim currently only exports a default (export default
mod.default !== undefined ? mod.default : mod;) which removes the module's named
exports and breaks imports like Tabs, TabPanel, TreeView, Breadcrumbs, Stepper,
Pagination, DraggableTabs, PersistentTabPanel (and related items such as
TabItem, TreeNode, DraggableTab, StepItem). Update the shim to also re-export
the module's named exports from the mod namespace (e.g., re-export Tabs,
TabPanel, TreeView, Breadcrumbs, Stepper, Pagination, DraggableTabs,
PersistentTabPanel or simply export all named exports from mod) so existing
named imports keep working while preserving the default export behavior
implemented in the current mod.default fallback.

Comment on lines 13 to 14
// Default export: prefer mod.default, fall back to the module namespace itself.
export default mod.default !== undefined ? mod.default : mod;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Checking named-import usage of `@omniviewdev/ui/overlays`..."
rg -nP "import\\s*\\{[^}]+\\}\\s*from\\s*['\"]@omniviewdev/ui/overlays['\"]" -C2

echo
echo "Current shim export surface..."
rg -nP "export\\s+(const|default)\\s" packages/omniviewdev-vite-plugin/shims/_omniviewdev__ui__overlays.mjs -C1

Repository: omniviewdev/omniview

Length of output: 19732


Restore named exports for @omniviewdev/ui/overlays; line 14 is a breaking API change.

The shim currently exports only a default, but 20+ files across the codebase import named symbols (Modal, Tooltip, Popover, useToast, ToastProvider, Spotlight, NotificationCenter, ErrorOverlay, Drawer, Dialog). This breaks plugin compatibility and build resolution.

Suggested fix
 // Default export: prefer mod.default, fall back to the module namespace itself.
+export const Dialog = mod.Dialog;
+export const Drawer = mod.Drawer;
+export const ErrorOverlay = mod.ErrorOverlay;
+export const Modal = mod.Modal;
+export const NotificationCenter = mod.NotificationCenter;
+export const Popover = mod.Popover;
+export const Spotlight = mod.Spotlight;
+export const ToastProvider = mod.ToastProvider;
+export const Tooltip = mod.Tooltip;
+export const useToast = mod.useToast;
 export default mod.default !== undefined ? mod.default : mod;
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// Default export: prefer mod.default, fall back to the module namespace itself.
export default mod.default !== undefined ? mod.default : mod;
// Default export: prefer mod.default, fall back to the module namespace itself.
export const Dialog = mod.Dialog;
export const Drawer = mod.Drawer;
export const ErrorOverlay = mod.ErrorOverlay;
export const Modal = mod.Modal;
export const NotificationCenter = mod.NotificationCenter;
export const Popover = mod.Popover;
export const Spotlight = mod.Spotlight;
export const ToastProvider = mod.ToastProvider;
export const Tooltip = mod.Tooltip;
export const useToast = mod.useToast;
export default mod.default !== undefined ? mod.default : mod;
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/omniviewdev-vite-plugin/shims/_omniviewdev__ui__overlays.mjs` around
lines 13 - 14, The shim currently only exports a default which breaks named
imports from "@omniviewdev/ui/overlays"; update the module export so it still
exports the default (mod.default || mod) and also re-exports/assigns the named
symbols (Modal, Tooltip, Popover, useToast, ToastProvider, Spotlight,
NotificationCenter, ErrorOverlay, Drawer, Dialog) from the module namespace when
present (falling back to properties on the default export if necessary), so both
default and named imports resolve correctly; locate the existing default export
statement and add logic to export those named symbols from mod (or mod.default)
accordingly.

Comment on lines 13 to 14
// Default export: prefer mod.default, fall back to the module namespace itself.
export default mod.default !== undefined ? mod.default : mod;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

# First, explore the shim file structure and surrounding context
find packages/omniviewdev-vite-plugin/shims -type f -name "*theme*" | head -20

Repository: omniviewdev/omniview

Length of output: 130


🏁 Script executed:

# Also, let's look at the shim file in full
cat packages/omniviewdev-vite-plugin/shims/_omniviewdev__ui__theme.mjs

Repository: omniviewdev/omniview

Length of output: 665


🏁 Script executed:

# Search for the referenced devSharedExporter
find . -type f -name "*devSharedExporter*" | head -10

Repository: omniviewdev/omniview

Length of output: 110


🏁 Script executed:

# Look for the actual ui/theme module
find . -type f -path "*ui*theme*" -name "*.ts" -o -path "*ui*theme*" -name "*.js" | grep -v node_modules | head -20

Repository: omniviewdev/omniview

Length of output: 769


🏁 Script executed:

# Check the actual ui/theme module
cat ui/theme/index.ts

Repository: omniviewdev/omniview

Length of output: 319


🏁 Script executed:

# Check the devSharedExporter to see how it exports
cat ui/features/plugins/api/devSharedExporter.ts

Repository: omniviewdev/omniview

Length of output: 2589


🏁 Script executed:

# Search for imports of `@omniviewdev/ui/theme` across the codebase
rg "from\s+['\"]@omniviewdev/ui/theme['\"]|from\s+['\"].*ui/theme['\"]" --type ts --type js -A 2 | head -100

Repository: omniviewdev/omniview

Length of output: 554


🏁 Script executed:

# Find `@omniviewdev/ui` package and check its entry point
find packages -name "package.json" | xargs grep -l "@omniviewdev/ui" | head -5

Repository: omniviewdev/omniview

Length of output: 143


🏁 Script executed:

# Check packages/omniviewdev-ui structure
cat packages/omniviewdev-ui/package.json

Repository: omniviewdev/omniview

Length of output: 7072


🏁 Script executed:

# Check the packages/omniviewdev-ui/src/theme/index.ts (different from ui/theme/index.ts)
cat packages/omniviewdev-ui/src/theme/index.ts

Repository: omniviewdev/omniview

Length of output: 3583


🏁 Script executed:

# Search for ALL imports from `@omniviewdev/ui/theme` to get full picture
rg "from\s+['\"]@omniviewdev/ui/theme['\"]" -A 1 -B 1 | head -60

Repository: omniviewdev/omniview

Length of output: 557


🏁 Script executed:

# Find plugin directories and search for imports of `@omniviewdev/ui/theme` in plugins
find . -type d -name "*plugin*" | grep -v node_modules | head -20

Repository: omniviewdev/omniview

Length of output: 793


🏁 Script executed:

# Search more broadly for files that might be plugins using the theme module
rg "import.*@omniviewdev/ui/theme" -g "plugin*" --type ts --type js

Repository: omniviewdev/omniview

Length of output: 46


🏁 Script executed:

# Check if there are plugin files that use the theme
find . -path "*/plugins/*" -name "*.ts" -o -path "*/plugins/*" -name "*.tsx" | xargs grep -l "@omniviewdev/ui/theme" 2>/dev/null | head -20

Repository: omniviewdev/omniview

Length of output: 186


🏁 Script executed:

# Check what shared_dependencies exports
find . -name "shared_dependencies*" -type f

Repository: omniviewdev/omniview

Length of output: 112


🏁 Script executed:

# Check the shared_dependencies.ts file
cat ui/features/plugins/api/shared_dependencies.ts

Repository: omniviewdev/omniview

Length of output: 5210


🏁 Script executed:

# Search in plugins directory for any imports of theme-related modules
rg "theme|AppTheme|initThemeRegistry|resetTheme" plugins/ --type ts --type tsx -i

Repository: omniviewdev/omniview

Length of output: 91


🏁 Script executed:

# Check the actual plugin examples
ls -la plugins/

Repository: omniviewdev/omniview

Length of output: 637


🏁 Script executed:

# Look at the container plugin to see what it imports
find plugins/containers -name "*.ts" -o -name "*.tsx" | head -5 | xargs head -30

Repository: omniviewdev/omniview

Length of output: 3761


Shim export shape prevents named imports from plugins.

The shim exports only default (conditional fallback to module namespace). Since the source @omniviewdev/ui/theme module has no default export, the fallback exports the entire namespace as default. Any plugin attempting named imports (e.g., import { AppTheme, initThemeRegistry }) will fail—they would need to use import mod from '@omniviewdev/ui/theme' and destructure from the default.

No current plugins import this module, but this pattern would break any future plugin trying named imports without migration to default-import syntax.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/omniviewdev-vite-plugin/shims/_omniviewdev__ui__theme.mjs` around
lines 13 - 14, The shim currently only sets a default export via the conditional
"export default mod.default !== undefined ? mod.default : mod", which prevents
consumers from using named imports like AppTheme or initThemeRegistry; update
the shim so it re-exports the module namespace as named exports and still
provides the default fallback: add a re-export of all named exports from the
loaded module (so named imports like AppTheme work) and keep the existing
default-export fallback using mod and mod.default; modify the export handling
around the symbol "mod" (the conditional default export) to also perform "export
*" semantics for the module namespace so both named and default imports succeed.

Comment on lines 13 to 14
// Default export: prefer mod.default, fall back to the module namespace itself.
export default mod.default !== undefined ? mod.default : mod;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

cat -n packages/omniviewdev-vite-plugin/shims/_omniviewdev__ui__types.mjs

Repository: omniviewdev/omniview

Length of output: 763


🏁 Script executed:

rg "toMuiSize|toMuiVariant|INPUT_HEIGHTS" --type ts --type tsx --type js --type mjs

Repository: omniviewdev/omniview

Length of output: 91


🏁 Script executed:

rg "@omniviewdev/ui/types" --type ts --type tsx --type js --type mjs -A 2

Repository: omniviewdev/omniview

Length of output: 91


🏁 Script executed:

fd -e ts -e tsx -e mjs -e js | xargs grep -l "toMuiSize\|toMuiVariant\|INPUT_HEIGHTS" | head -20

Repository: omniviewdev/omniview

Length of output: 1047


🏁 Script executed:

cat -n packages/omniviewdev-ui/src/types/index.ts

Repository: omniviewdev/omniview

Length of output: 690


🏁 Script executed:

cat -n packages/omniviewdev-ui/src/types/maps.ts

Repository: omniviewdev/omniview

Length of output: 5878


🏁 Script executed:

rg "from.*@omniviewdev/ui" --type js --type mjs -A 1 -B 1

Repository: omniviewdev/omniview

Length of output: 91


🏁 Script executed:

find packages -name "*.ts" -o -name "*.js" | xargs grep -l "import.*from.*@omniviewdev/ui/types" 2>/dev/null | head -10

Repository: omniviewdev/omniview

Length of output: 46


🏁 Script executed:

ls -la packages/omniviewdev-vite-plugin/shims/

Repository: omniviewdev/omniview

Length of output: 5026


🏁 Script executed:

head -20 packages/omniviewdev-vite-plugin/shims/_omniviewdev__ui__buttons.mjs

Repository: omniviewdev/omniview

Length of output: 671


🏁 Script executed:

find packages/omniviewdev-vite-plugin -name "*generate*" -o -name "*shim*" | head -20

Repository: omniviewdev/omniview

Length of output: 161


🏁 Script executed:

rg "generate-shims" --type ts --type js

Repository: omniviewdev/omniview

Length of output: 917


🏁 Script executed:

cat -n packages/omniviewdev-vite-plugin/scripts/generate-shims.ts

Repository: omniviewdev/omniview

Length of output: 8060


Add @omniviewdev/ui/types to KNOWN_EXPORTS in generate-shims.ts to preserve named exports in the shim.

The source file exports utilities like toMuiSize, toMuiVariant, INPUT_HEIGHTS, toMuiColor, toMuiInputSize, sizeOverrideSx, toBorderRadius, toCssColor, and statusToColor, but the generated shim only provides a default export. Without these named exports in the shim, any code importing named helpers will fail.

Add this entry to the KNOWN_EXPORTS object:

'@omniviewdev/ui/types': [
  'toMuiColor', 'toMuiVariant', 'toMuiSize', 'toMuiInputSize',
  'sizeOverrideSx', 'toBorderRadius', 'toCssColor', 'statusToColor',
  'INPUT_HEIGHTS',
],

Then regenerate the shim with: pnpm --filter @omniviewdev/vite-plugin generate-shims

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/omniviewdev-vite-plugin/shims/_omniviewdev__ui__types.mjs` around
lines 13 - 14, The generated shim for `@omniviewdev/ui/types` only provides a
default export and lacks the named helpers; update the KNOWN_EXPORTS object in
generate-shims.ts to include '@omniviewdev/ui/types' with the named exports
['toMuiColor','toMuiVariant','toMuiSize','toMuiInputSize','sizeOverrideSx','toBorderRadius','toCssColor','statusToColor','INPUT_HEIGHTS'],
then re-run the shim generator (pnpm --filter `@omniviewdev/vite-plugin`
generate-shims) so the shim file (_omniviewdev__ui__types.mjs) preserves those
named exports for consumers importing them.

Comment on lines 13 to 14
// Default export: prefer mod.default, fall back to the module namespace itself.
export default mod.default !== undefined ? mod.default : mod;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

# First, check the current state of the shim file
cat -n packages/omniviewdev-vite-plugin/shims/_omniviewdev__ui.mjs 2>/dev/null || echo "File not found, searching for it..."
fd -name "*omniviewdev*ui*" -type f

Repository: omniviewdev/omniview

Length of output: 993


🏁 Script executed:

# Check if git history shows what changed
cd packages/omniviewdev-vite-plugin/shims/ && git log --oneline -20 _omniviewdev__ui.mjs 2>/dev/null || echo "No git history available"
git show HEAD:_omniviewdev__ui.mjs 2>/dev/null | head -30 || echo "Cannot show git version"

Repository: omniviewdev/omniview

Length of output: 148


🏁 Script executed:

# Search for named imports from `@omniviewdev/ui` in the mentioned files
rg "import\s*\{[^}]*\}\s*from\s*['\"]@omniviewdev/ui" --type typescript --type tsx

Repository: omniviewdev/omniview

Length of output: 98


🏁 Script executed:

# Also check for general imports from `@omniviewdev/ui`
rg "from\s+['\"]@omniviewdev/ui['\"]" --type typescript --type tsx -A 1

Repository: omniviewdev/omniview

Length of output: 98


🏁 Script executed:

# Search for imports from `@omniviewdev/ui` (fixing the rg syntax)
rg "from ['\"]@omniviewdev/ui['\"]" -A 1 -B 1

Repository: omniviewdev/omniview

Length of output: 25326


🏁 Script executed:

# Search for specific named imports mentioned in the review: Card, Divider, Avatar, ClipboardText
rg "import.*\{.*Card" --glob "*.tsx" --glob "*.ts"
rg "import.*\{.*Divider" --glob "*.tsx" --glob "*.ts"
rg "import.*\{.*Avatar" --glob "*.tsx" --glob "*.ts"
rg "import.*\{.*ClipboardText" --glob "*.tsx" --glob "*.ts"

Repository: omniviewdev/omniview

Length of output: 9704


🏁 Script executed:

# Check the original `@omniviewdev/ui` source to understand what it exports
find . -path "*/node_modules" -prune -o -name "package.json" -type f -print | xargs grep -l "@omniviewdev/ui" 2>/dev/null | head -5
fd -name "index.ts" -o -name "index.tsx" -o -name "index.js" | rg "omniviewdev/ui|base-ui"

Repository: omniviewdev/omniview

Length of output: 477


🏁 Script executed:

# Let's look at the packages directory to find the source of `@omniviewdev/ui`
fd -type d -name "ui" packages/

Repository: omniviewdev/omniview

Length of output: 234


🏁 Script executed:

# Check what `@omniviewdev/ui` actually exports - look at its package.json and main export
cat packages/omniviewdev-ui/package.json | head -30

Repository: omniviewdev/omniview

Length of output: 830


🏁 Script executed:

# Check the main entry point to understand what's exported
ls -la packages/omniviewdev-ui/src/

Repository: omniviewdev/omniview

Length of output: 1392


🏁 Script executed:

# Look at the index file to see what's exported from `@omniviewdev/ui`
head -100 packages/omniviewdev-ui/src/index.ts 2>/dev/null || head -100 packages/omniviewdev-ui/src/index.tsx 2>/dev/null || head -100 packages/omniviewdev-ui/dist/index.d.ts 2>/dev/null || echo "Checking structure..."

Repository: omniviewdev/omniview

Length of output: 3775


🏁 Script executed:

# Check if there's an old version of the shim in git history
git log --all --full-history -- "packages/omniviewdev-vite-plugin/shims/_omniviewdev__ui.mjs" 2>/dev/null | head -20 || echo "Checking alternative paths..."
git show 7fbcf8c:packages/omniviewdev-vite-plugin/shims/_omniviewdev__ui.mjs 2>/dev/null || echo "No previous version in that commit"

Repository: omniviewdev/omniview

Length of output: 1203


🏁 Script executed:

# Check if other shims have a similar pattern (re-exporting named exports)
find packages/omniviewdev-vite-plugin/shims/ -name "*.mjs" -type f | head -5
cat packages/omniviewdev-vite-plugin/shims/_omniviewdev__base_ui.mjs 2>/dev/null || cat packages/omniviewdev-vite-plugin/shims/*.mjs 2>/dev/null | head -50

Repository: omniviewdev/omniview

Length of output: 2733


Add named export re-exports to the @omniviewdev/ui shim.

The shim is currently default-only, but the source module exports many named symbols (Card, Avatar, Divider, ClipboardText, etc.) that are actively imported across the codebase. Code like import { Card } from '@omniviewdev/ui' will fail at runtime.

The shim should follow the pattern used by other auto-generated shims in the same directory (e.g., _dnd-kit__core.mjs), which explicitly re-export all named exports before the default export fallback.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/omniviewdev-vite-plugin/shims/_omniviewdev__ui.mjs` around lines 13
- 14, The shim currently only provides a default export so named imports like
Card or Avatar fail; update the shim (the module that currently contains the
fallback line "export default mod.default !== undefined ? mod.default : mod") to
explicitly re-export the module's named symbols (e.g., Card, Avatar, Divider,
ClipboardText, etc.) using the same pattern as other generated shims (see
_dnd-kit__core.mjs): add explicit named re-exports that map to properties on mod
(exporting each named symbol from mod) and then keep the existing default export
fallback as the last line.

@joshuapare
joshuapare merged commit 54ae0ce into main Mar 28, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant